generated from mac-arrap/sample-os-standard-repo
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PRO-3083 & PRO-3102: Deprecate use of Bio Auth Service /templatizer &…
… update comments (#71) * Calls to Bio Auth Service should use /save instead of /templatizer. * Update comments throughout the repo to reference Bio Auth Service instead of Identity Service. Signed-off-by: Jeff Kennedy <[email protected]>
- Loading branch information
Jeff Kennedy
authored
Jun 17, 2021
1 parent
86d38cc
commit dc00ace
Showing
11 changed files
with
94 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import { BioAuthBulkSaveDto } from './dto/bio.auth.bulk.save.dto'; | ||
|
||
export abstract class IBioAuthService { | ||
abstract verifyFingerprint(position: number, image: string, dids: string): Promise<any>; | ||
abstract verifyFingerprintTemplate(position: number, template: string, dids: string): Promise<any>; | ||
abstract templatize(data: any): Promise<any>; | ||
abstract bulkSave(dto: BioAuthBulkSaveDto): Promise<any>; | ||
abstract qualityCheck(dids: string): Promise<any>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { BioAuthSaveDto } from './bio.auth.save.dto'; | ||
import { ValidateNested } from 'class-validator'; | ||
|
||
/** | ||
* DTO for each fingerprint in the body of the request sent to Bio Auth Service's /save endpoint | ||
*/ | ||
export class BioAuthBulkSaveDto { | ||
@ValidateNested() readonly fingerprints: Array<BioAuthSaveDto>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { BioAuthSaveParamsDto } from './bio.auth.save.params.dto'; | ||
import { IsString, ValidateNested } from 'class-validator'; | ||
import { Type } from 'class-transformer'; | ||
|
||
/** | ||
* DTO for the body of the request sent to Bio Auth Service's /save endpoint | ||
*/ | ||
export class BioAuthSaveDto { | ||
@IsString() readonly id: string; | ||
@ValidateNested() @Type(() => BioAuthSaveParamsDto) readonly params: BioAuthSaveParamsDto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { FingerprintTypeEnum } from '../fingerprint.type.enum'; | ||
import { IsEnum, IsInt, IsISO8601, IsNumber, IsOptional, IsString, Length } from 'class-validator'; | ||
import { FingerprintPositionEnum } from '../fingerprint.position.enum'; | ||
|
||
/** | ||
* DTO for the params of each fingerprint in the body of the request sent to Bio Auth Service's /save endpoint | ||
*/ | ||
export class BioAuthSaveParamsDto { | ||
@IsInt() readonly type_id: number; | ||
@IsISO8601() readonly capture_date: string; | ||
@IsEnum(FingerprintPositionEnum) readonly position: FingerprintPositionEnum; | ||
@IsOptional() @IsString() readonly image?: string; | ||
@IsOptional() @IsString() readonly template?: string; | ||
@IsOptional() @IsNumber() readonly quality_score?: number; | ||
@IsOptional() @Length(2, 2) readonly missing_code?: string; | ||
@IsEnum(FingerprintTypeEnum) readonly type: FingerprintTypeEnum; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* This enum is a simple way to capture which finger is represented by a given fingerprint. | ||
*/ | ||
export enum FingerprintPositionEnum { | ||
RIGHT_THUMB = '1', | ||
RIGHT_INDEX = '2', | ||
RIGHT_MIDDLE = '3', | ||
RIGHT_RING = '4', | ||
RIGHT_PINKY = '5', | ||
LEFT_THUMB = '6', | ||
LEFT_INDEX = '7', | ||
LEFT_MIDDLE = '8', | ||
LEFT_RING = '9', | ||
LEFT_PINKY = '10' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* Currently supported modes of interacting with Bio Auth Service via fingerprints | ||
*/ | ||
export enum FingerprintTypeEnum { | ||
IMAGE = 'IMAGE', | ||
TEMPLATE = 'TEMPLATE' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters