-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: add webauthn for testing Signed-off-by: Mirko Mollik <[email protected]> * Add support for ed25519 keys Fixes #36 Signed-off-by: Mirko Mollik <[email protected]> * fix: building api response Signed-off-by: Mirko Mollik <[email protected]> --------- Signed-off-by: Mirko Mollik <[email protected]> Signed-off-by: Mirko Mollik <[email protected]>
- Loading branch information
Showing
25 changed files
with
1,224 additions
and
1,170 deletions.
There are no files selected for viewing
45 changes: 37 additions & 8 deletions
45
apps/holder-backend/src/app/oid4vc/oid4vp/dto/submission-request.dto.ts
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,13 +1,42 @@ | ||
import { AuthenticationResponseJSON } from '@simplewebauthn/types'; | ||
import { | ||
AuthenticationExtensionsClientOutputs, | ||
AuthenticatorAssertionResponseJSON, | ||
AuthenticatorAttachment, | ||
AuthenticationResponseJSON as IAuthenticationResponseJSON, | ||
} from '@simplewebauthn/types'; | ||
import { | ||
IsOptional, | ||
IsString, | ||
ValidateNested, | ||
IsObject, | ||
} from 'class-validator'; | ||
import { Type } from 'class-transformer'; | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
export class CredentialSelection { | ||
[key: string]: string; | ||
class AuthenticationResponseJSON implements IAuthenticationResponseJSON { | ||
id: string; | ||
rawId: string; | ||
response: AuthenticatorAssertionResponseJSON; | ||
@ApiProperty({ enum: ['cross-platform', 'platform'] }) | ||
authenticatorAttachment?: AuthenticatorAttachment; | ||
clientExtensionResults: AuthenticationExtensionsClientOutputs; | ||
type: 'public-key'; | ||
} | ||
export class AuthSubmission { | ||
@IsString() | ||
session: string; | ||
|
||
@ValidateNested() | ||
@Type(() => AuthenticationResponseJSON) | ||
response: AuthenticationResponseJSON; | ||
} | ||
|
||
export class SubmissionRequest { | ||
auth?: { | ||
session: string; | ||
response: AuthenticationResponseJSON; | ||
}; | ||
values: CredentialSelection; | ||
@IsOptional() | ||
@ValidateNested() | ||
@Type(() => AuthSubmission) | ||
auth?: AuthSubmission; | ||
|
||
@IsObject() | ||
values: Record<string, string>; | ||
} |
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
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
Oops, something went wrong.