Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthFailed = "AUTH_FAILED" AuthNewPasswordRequired = "NEW_PASSWORD_REQUIRED" AuthSuccess = "AUTH_SUCCESS" AuthInvalidRequest = "INVALID_REQUEST" AuthInvalidNewPassword = "INVALID_NEW_PASSWORD" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface { Init(config []byte) error Login(ctx context.Context, orgData *am.Organization, details *LoginDetails) (map[string]string, error) Logout(ctx context.Context, orgData *am.Organization, userName string) error SetNewPassword(ctx context.Context, orgData *am.Organization, details *LoginDetails) (map[string]string, error) Refresh(ctx context.Context, details *TokenDetails) (map[string]string, error) Forgot(ctx context.Context, orgData *am.Organization, details *ResetDetails) error Reset(ctx context.Context, orgData *am.Organization, details *ResetDetails) error }
Authenticator authenticates a user
type LoginDetails ¶
type LoginDetails struct { OrgName string `json:"org_name" validate:"required,gte=3,lte=128"` Username string `json:"user_name" validate:"required,gte=3,lte=256"` Password string `json:"password,omitempty" validate:"required,gte=8,lte=256"` NewPassword string `json:"new_password,omitempty" validate:"omitempty,gte=3,lte=256"` }
type ResetDetails ¶
type ResetDetails struct { OrgName string `json:"org_name" validate:"required,gte=3,lte=128"` Username string `json:"user_name" validate:"required,gte=3,lte=256"` Password string `json:"password,omitempty" validate:"omitempty,gte=8,lte=256"` VerificationCode string `json:"verification_code,omitempty" validate:"omitempty,gte=3,lte=256"` }
ResetDetails for when a user must reset their password.
type TokenDetails ¶
type UserDetails ¶
Click to show internal directories.
Click to hide internal directories.