Documentation ¶
Index ¶
Constants ¶
View Source
const ( // General messages NotImplemented = "NotImplemented" InternalError = "InternalError" FormParsingError = "FormParsingError" DecodingFailed = "DecodingFailed" ActionMissing = "ActionMissing" IncorrectArguments = "IncorrectArguments" OK = "OK" // User input messages MissingEmail = "MissingEmail" InvalidEmail = "InvalidEmail" InvalidUsername = "InvalidUsername" MissingPassword = "MissingPassword" PasswordComplexityTooLow = "PasswordComplexityTooLow" DuplicateUserAccount = "DuplicateUserAccount" CreateUserSuccess = "CreateUserSuccess" // Status messages LoginSuccessful = "LoginSuccessful" LogoutSuccessful = "LogoutSuccessful" ActivationSuccessful = "ActivationSuccessful" AccountLocked = "AccountLocked" UnlockSuccessful = "UnlockSuccessful" PasswordUpdated = "PasswordUpdated" AlreadyAuthenticated = "AlreadyAuthenticated" InvalidToken = "InvalidToken" MissingToken = "MissingToken" NoRecoveryPending = "NoRecoveryPending" LoginRequired = "LoginRequired" // Second factor messages SecondFactorRequired = "SecondFactorRequired" SecondFactorNoRequestSession = "SecondFactorNoSession" SecondFactorInvalidSession = "SecondFactorInvalidSession" SecondFactorBadResponse = "SecondFactorBadResponse" SecondFactorSuccess = "SecondFactorSuccess" SecondFactorFailed = "SecondFactorFailed" TokenNameRequired = "TokenNameRequired" SecondFactorNotFound = "SecondFactorNotFound" U2FRegistrationFailed = "U2FRegistrationFailed" U2FRegistrationComplete = "U2FRegistrationComplete" NoU2FPending = "NoU2FPending" NoU2FTokenFound = "NoU2FTokenFound" U2FTokenRemoved = "U2FTokenRemoved" RecoveryNoRequestPending = "RecoveryNoRequestPending" TOTPTokenRemoved = "TOTPTokenRemoved" BackupTokenOverwriteRequired = "CreateBackupTokenOverwriteRequired" BackupTokensRemoved = "BackupTokensRemoved" // OAuth messages OAuthInvalidClientName = "OAuthInvalidClientName" OAuthInvalidRedirect = "OAuthInvalidRedirect" OAuthNoAuthorizePending = "OAuthNoAuthorizePending" OAuthNoTokenFound = "OAuthNoTokenFound" OAuthNoGrantedScopes = "OAuthNoGrantedScopes" OAuthMissingAccessToken = "OAuthMissingAccessToken" )
API Response Messages for frontend / internationalisation parsing
Variables ¶
View Source
var TokenError = errors.New("internal server error")
View Source
var TokenErrorAlreadyUsed = errors.New("action token already used")
View Source
var TokenErrorInvalidAction = errors.New("action token invalid action")
View Source
var TokenErrorInvalidUser = errors.New("action token invalid user")
View Source
var TokenErrorNotFound = errors.New("action token not found")
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { // Response code Code string `json:"code"` }
Response Common API response object
type TokenAction ¶
type TokenAction string
Token action type for interface
const TokenActionActivate TokenAction = "activate"
Token success actions
const TokenActionExpired TokenAction = "expired"
const TokenActionInvalid TokenAction = "invalid"
Token error actions
const TokenActionRecovery TokenAction = "recover"
const TokenActionUnlock TokenAction = "unlock"
Click to show internal directories.
Click to hide internal directories.