Documentation
¶
Overview ¶
yclient provides an interface for communicating with the Ydentifi MFA API
Index ¶
- Constants
- type AuthenticateEmailAndPasswordPayload
- type AuthenticateOobCodePayload
- type AuthenticateTotpPayload
- type CreateMobile2faUserPayload
- type CreateRelyingPartyPayload
- type CreateUserPayload
- type DeleteUserPayload
- type EnrollSoftToken2faPayload
- type IdToken
- type IdTokenClaims
- type IssueUserOobTokenPayload
- type MfaIdentityPayload
- type ResetPasswordPayload
- type SendEmailVerificationCodePayload
- type ServerAuthorizationPayload
- type ServerChallenge
- type ServerChallengeResponse
- type UnlockUserPayload
- type UpdatePublicKeysPayload
- type UserRecordData
- type VerifyEmailPayload
- type YdentifiClient
Constants ¶
const GetServerChallengeUrl string = "/get-auth-challenge"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticateEmailAndPasswordPayload ¶
type AuthenticateEmailAndPasswordPayload struct {
UserEmail string
PasswordPlaintext string
IdentityProofToken string
}
AuthenticateEmailAndPasswordPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type AuthenticateOobCodePayload ¶ added in v0.7.12
type AuthenticateOobCodePayload struct {
UserEmail string
OobCode string
IdentityProofToken string
}
AuthenticateOobCodePayload defines the required payload structure for the respective endpoints in the Ydentifi API
type AuthenticateTotpPayload ¶ added in v0.7.5
AuthenticateTotpPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type CreateMobile2faUserPayload ¶
type CreateMobile2faUserPayload struct {
UserEmail string
UserPhoneNumber string
UserDisplayName string
}
CreateMobile2faUserPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type CreateRelyingPartyPayload ¶ added in v0.8.0
type CreateRelyingPartyPayload struct {
Name string
EncPubKeyPem string
SignPubKeyPem string
AuthPolicy string
QuotasPlan string
UserLimitsPlan string
}
CreateRelyingPartyPayload defines the necessary content for invoking the Ydentifi API create-relying-party admin endpoint
type CreateUserPayload ¶ added in v0.2.0
CreateUserPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type DeleteUserPayload ¶
type DeleteUserPayload struct {
UserEmail string
}
DeleteUserPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type EnrollSoftToken2faPayload ¶
EnrollSoftToken2faPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type IdToken ¶ added in v0.7.8
type IdToken struct {
Claims IdTokenClaims `json:"claims"`
Signature string `json:"signature"`
}
IdToken is a type containing proof of identity claims for a particular user
type IdTokenClaims ¶ added in v0.7.8
type IdTokenClaims struct {
Nonce string `json:"nonce"`
Iss string `json:"iss"`
Aud string `json:"aud"`
Iat time.Time `json:"iat"`
Exp time.Time `json:"exp"`
Ctx []string `json:"ctx"`
Uid string `json:"uid"`
Custom map[string]interface{} `json:"custom"`
}
IdTokenClaims contains the claims payload of an IdToken
type IssueUserOobTokenPayload ¶ added in v0.7.15
type IssueUserOobTokenPayload struct {
UserEmail string
}
IssueUserOobTokenPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type MfaIdentityPayload ¶ added in v0.7.20
MfaIdentityPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type ResetPasswordPayload ¶ added in v0.7.17
type ResetPasswordPayload struct {
UserEmail string
NewPassword string
IdentityProofToken string
OobRecovery bool // Whether the IdentityProofToken oncludes an oob proof of ID
}
ResetPasswordPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type SendEmailVerificationCodePayload ¶ added in v0.7.7
type SendEmailVerificationCodePayload struct {
UserEmail string
}
SendEmailVerificationCodePayload defines the required payload structure for the respective endpoints in the Ydentifi API
type ServerAuthorizationPayload ¶ added in v0.4.0
type ServerAuthorizationPayload struct {
Token string
EncryptedKey string // Encrypted AES or ChaCha20 compatible key used for envelope encryption
}
ServerAuthorization contains credentials for calling the API endpoints
type ServerChallenge ¶ added in v0.4.0
ServerChallenge defines the content of the the server challenge payload
type ServerChallengeResponse ¶ added in v0.2.0
ServerChallengeResponse contains a signature on the server challenge
type UnlockUserPayload ¶ added in v0.5.0
type UnlockUserPayload struct {
UserEmail string
}
UnlockUserPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type UpdatePublicKeysPayload ¶ added in v0.3.0
UpdatePublicKeysPayload defines the required payload structure for the respective endpoints in the Ydentifi API
Note: keys are expected in PEM format
type UserRecordData ¶
type UserRecordData struct {
UserEmail string
PhoneNumber string
UserDisplayName string
EmailVerified bool
Disabled bool
}
UserRecordData defines the payload structure for sharing client data with the frontend in the Ydentifi API
type VerifyEmailPayload ¶ added in v0.7.6
type VerifyEmailPayload struct {
UserEmail string
VerificationCode string
IdentityProofToken string
}
VerifyEmailPayload defines the required payload structure for the respective endpoints in the Ydentifi API
type YdentifiClient ¶
YdentfiClient is the default intermediary between a consumer application and the Ydentifi API.
ClientAppId - the unique ID of your app provided by the Ydentifi service/API ApiBaseUrl - the schema and the URL location of the Ydentifi API (e.g. https://where-ydentifi-is-hosted.com).