-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement VerifyUserAttribute service
- Loading branch information
Showing
8 changed files
with
136 additions
and
75 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
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,62 @@ | ||
import type { TargetBody } from './auth'; | ||
import type { MaybeId } from './brandedId'; | ||
|
||
export type UserSrpAuthTarget = TargetBody< | ||
{ | ||
AuthFlow: 'USER_SRP_AUTH'; | ||
AuthParameters: { USERNAME: string; SRP_A: string }; | ||
ClientId: MaybeId['userPoolClient']; | ||
}, | ||
{ | ||
ChallengeName: 'PASSWORD_VERIFIER'; | ||
ChallengeParameters: { | ||
SALT: string; | ||
SECRET_BLOCK: string; | ||
SRP_B: string; | ||
USERNAME: string; | ||
USER_ID_FOR_SRP: string; | ||
}; | ||
} | ||
>; | ||
|
||
export type RefreshTokenAuthTarget = TargetBody< | ||
{ | ||
AuthFlow: 'REFRESH_TOKEN_AUTH'; | ||
AuthParameters: { REFRESH_TOKEN: string }; | ||
ClientId: MaybeId['userPoolClient']; | ||
}, | ||
{ | ||
AuthenticationResult: { | ||
AccessToken: string; | ||
ExpiresIn: number; | ||
IdToken: string; | ||
TokenType: 'Bearer'; | ||
}; | ||
ChallengeParameters: Record<string, never>; | ||
} | ||
>; | ||
|
||
export type InitiateAuthTarget = UserSrpAuthTarget | RefreshTokenAuthTarget; | ||
|
||
export type RespondToAuthChallengeTarget = TargetBody< | ||
{ | ||
ChallengeName: 'PASSWORD_VERIFIER'; | ||
ChallengeResponses: { | ||
PASSWORD_CLAIM_SECRET_BLOCK: string; | ||
PASSWORD_CLAIM_SIGNATURE: string; | ||
TIMESTAMP: string; | ||
USERNAME: string; | ||
}; | ||
ClientId: MaybeId['userPoolClient']; | ||
}, | ||
{ | ||
AuthenticationResult: { | ||
AccessToken: string; | ||
ExpiresIn: number; | ||
IdToken: string; | ||
RefreshToken: string; | ||
TokenType: 'Bearer'; | ||
}; | ||
ChallengeParameters: Record<string, never>; | ||
} | ||
>; |
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