Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shukob/7337ab2d90b84ee2f6c922dafd0d6cc2 to your computer and use it in GitHub Desktop.
Save shukob/7337ab2d90b84ee2f6c922dafd0d6cc2 to your computer and use it in GitHub Desktop.
import "github.com/aws/aws-lambda-go/events"
type CognitoEventUserPoolsDefineCustomAuth struct {
events.CognitoEventUserPoolsHeader
Request CognitoEventUserPoolsDefineCustomAuthRequest `json:"request"`
Response CognitoEventUserPoolsDefineCustomAuthResponse `json:"response"`
}
type CognitoEventUserPoolsDefineCustomAuthRequest struct {
UserAttributes map[string]string `json:"userAttributes"`
Session []CognitoEventUserPoolsCustomAuthChallengeResult `json:"session"`
}
type CognitoEventUserPoolsCustomAuthChallengeResult struct {
ChallengeName string `json:"challengeName"`
ChallengeResult bool `json:"challengeResult"`
ChallengeMetadata string `json:"challengeMetadata"`
}
type CognitoEventUserPoolsDefineCustomAuthResponse struct {
ChallengeName string `json:"challengeName"`
IssueTokens bool `json:"issueTokens"`
FailAuthentication bool `json:"failAuthentication"`
}
type CognitoEventUserPoolsCreateCustomAuth struct {
events.CognitoEventUserPoolsHeader
Request CognitoEventUserPoolsCreateCustomAuthRequest `json:"request"`
Response CognitoEventUserPoolsCreateCustomAuthResponse `json:"response"`
}
type CognitoEventUserPoolsCreateCustomAuthRequest struct {
UserAttributes map[string]string `json:"userAttributes"`
ChallengeName string `json:"challengeName"`
Session []CognitoEventUserPoolsCustomAuthChallengeResult `json:"session"`
}
type CognitoEventUserPoolsCreateCustomAuthResponse struct {
PublicChallengeParameters map[string]string `json:"publicChallengeParameters"`
PrivateChallengeParameters map[string]string `json:"privateChallengeParameters"`
ChallengeMetadata string `json:"challengeMetadata"`
}
type CognitoEventUserPoolsVerifyCustomAuth struct {
events.CognitoEventUserPoolsHeader
Request CognitoEventUserPoolsVerifyCustomAuthRequest `json:"request"`
Response CognitoEventUserPoolsVerifyCustomAuthResponse `json:"response"`
}
type CognitoEventUserPoolsVerifyCustomAuthRequest struct {
UserAttributes map[string]string `json:"userAttributes"`
PrivateChallengeParameters map[string]string `json:"privateChallengeParameters"`
ChallengeAnswer string `json:"challengeAnswer"`
}
type CognitoEventUserPoolsVerifyCustomAuthResponse struct {
AnswerCorrect bool `json:"answerCorrect"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment