Documentation ¶
Index ¶
- Constants
- type Auth
- func (auth *Auth) ChangePassword(ctx context.Context, tokenObj map[string]interface{}, userId string, ...) (err error)
- func (auth *Auth) CompleteRecovery(ctx context.Context, recoveryPassword RecoveryPassword, cookies []*http.Cookie) (msg string, err error)
- func (auth *Auth) FetchTokens(ctx context.Context, refresh_token string, userId string) (res interface{}, err error)
- func (auth *Auth) GenerateRecoveryCode(ctx context.Context, recoveryIdentifier RecoveryPostBody, projectId string, ...) (msg string, err error)
- func (auth *Auth) GenerateVerifyCode(ctx context.Context, verifyIdentifier VerifyPostBody, projectId string, ...) (msg string, err error)
- func (auth *Auth) GetAttribute(ctx context.Context, attributeName string) (attributeValue interface{}, err error)
- func (auth *Auth) GetAuthDb() (authDbI AuthDbI)
- func (auth *Auth) GetUrl(ctx context.Context, state string) (url string, msParams MsParams, err error)
- func (auth *Auth) GetUser(ctx context.Context, userId string) (identity Identity, err error)
- func (auth *Auth) GetUserInfo(ctx context.Context, access_token string) (identity Identity, err error)
- func (auth *Auth) Login(ctx context.Context, loginPostBody LoginPostBody, withTokens bool) (identity Identity, loginSuccess LoginSuccess, err error)
- func (auth *Auth) Logout(ctx context.Context, req *http.Request) (res interface{}, resStatusCode int, err error)
- func (auth *Auth) MakeFromJson(ctx context.Context, rj *json.RawMessage) error
- func (auth *Auth) PerformPreDeleteTask(ctx context.Context) (err error)
- func (auth *Auth) PerformPreSaveTask(ctx context.Context) (err error)
- func (auth *Auth) Register(ctx context.Context, registerUser RegisterUser, projectId string) (identity Identity, loginSuccess LoginSuccess, err error)
- func (auth *Auth) RemoveUser(ctx context.Context, removeUser RemoveUser) (err error)
- func (auth *Auth) SetAuthDb(authDbI AuthDbI)
- func (auth *Auth) UpdateUser(ctx context.Context, identityToUpdate Identity, userId string, ...) (err error)
- func (auth *Auth) VerifyCode(ctx context.Context, verifyCode VerifyCode, tokenObj map[string]interface{}, ...) (res interface{}, err error)
- func (auth *Auth) VerifyRecovery(ctx context.Context, recoveryPassword RecoveryPassword) (res map[string]string, cookies []*http.Cookie, err error)
- func (auth *Auth) VerifyToken(ctx context.Context, tokenType string, token string) (res interface{}, err error)
- type AuthDb
- type AuthDbI
- type AuthDbMysql
- type AuthDbPostgres
- type AuthHooks
- type AuthI
- type ChangePassword
- type EruAuth
- func (eruAuth *EruAuth) ChangePassword(ctx context.Context, tokenObj map[string]interface{}, userId string, ...) (err error)
- func (eruAuth *EruAuth) FetchTokens(ctx context.Context, refresh_token string, userId string) (res interface{}, err error)
- func (eruAuth *EruAuth) GenerateRecoveryCode(ctx context.Context, recoveryIdentifier RecoveryPostBody, projectId string, ...) (msg string, err error)
- func (eruAuth *EruAuth) GenerateVerifyCode(ctx context.Context, verifyIdentifier VerifyPostBody, projectId string, ...) (msg string, err error)
- func (eruAuth *EruAuth) GetUserInfo(ctx context.Context, access_token string) (identity Identity, err error)
- func (eruAuth *EruAuth) Login(ctx context.Context, loginPostBody LoginPostBody, withTokens bool) (identity Identity, loginSuccess LoginSuccess, err error)
- func (eruAuth *EruAuth) MakeFromJson(ctx context.Context, rj *json.RawMessage) error
- func (eruAuth *EruAuth) PerformPreDeleteTask(ctx context.Context) (err error)
- func (eruAuth *EruAuth) PerformPreSaveTask(ctx context.Context) (err error)
- func (eruAuth *EruAuth) Register(ctx context.Context, registerUser RegisterUser, projectId string) (identity Identity, loginSuccess LoginSuccess, err error)
- func (eruAuth *EruAuth) RemoveUser(ctx context.Context, removeUser RemoveUser) (err error)
- func (eruAuth *EruAuth) UpdateUser(ctx context.Context, identity Identity, userId string, ...) (err error)
- func (eruAuth *EruAuth) VerifyCode(ctx context.Context, verifyCode VerifyCode, tokenObj map[string]interface{}, ...) (res interface{}, err error)
- func (eruAuth *EruAuth) VerifyRecovery(ctx context.Context, recoveryPassword RecoveryPassword) (res map[string]string, cookies []*http.Cookie, err error)
- type EruConfig
- type HydraClient
- type HydraConfig
- func (hydraConfig HydraConfig) AcceptConsentRequest(ctx context.Context, identityHolder map[string]interface{}, ...) (tokens LoginSuccess, err error)
- func (hydraConfig HydraConfig) AcceptLoginRequest(ctx context.Context, subject string, loginChallenge string, ...) (consentChallenge string, respCookies []*http.Cookie, err error)
- func (hydraConfig HydraConfig) CreateHydraClient(ctx context.Context, hydraClient HydraClient) (resp interface{}, headers http.Header, statusCode int, err error)
- func (hydraConfig HydraConfig) DeleteHydraClient(ctx context.Context, clientId string) (resp interface{}, headers http.Header, statusCode int, err error)
- func (hydraConfig HydraConfig) GetAminUrl() (url string)
- func (hydraConfig HydraConfig) GetHydraClient(ctx context.Context, clientId string) (resp interface{}, headers map[string][]string, statusCode int, err error)
- func (hydra HydraConfig) GetLoginChallenge(ctx context.Context) (loginChallenge string, cookies []*http.Cookie, err error)
- func (hydraConfig HydraConfig) GetOauthConfig(ctx context.Context, clientId string) (oauth2Config *oauth2.Config, err error)
- func (hydraConfig HydraConfig) GetPublicUrl() (url string)
- func (hydraConfig HydraConfig) GetUserInfo(ctx context.Context, access_token string) (identity Identity, err error)
- func (hydraConfig HydraConfig) RemoveHydraClient(ctx context.Context, clientId string) (err error)
- func (hydraConfig HydraConfig) SaveHydraClient(ctx context.Context, hydraClient HydraClient) (err error)
- func (hydraConfig HydraConfig) UpdateHydraClient(ctx context.Context, clientId string, hydraClient HydraClient) (resp interface{}, headers http.Header, statusCode int, err error)
- type IdentifierConfig
- type Identifiers
- type Identity
- type IdentityAuth
- type KratosAuthenticationMethods
- type KratosConfig
- type KratosDevice
- type KratosFlow
- type KratosHydraAuth
- func (kratosHydraAuth *KratosHydraAuth) ChangePassword(ctx context.Context, tokenObj map[string]interface{}, userId string, ...) (err error)
- func (kratosHydraAuth *KratosHydraAuth) CompleteRecovery(ctx context.Context, recoveryPassword RecoveryPassword, cookies []*http.Cookie) (msg string, err error)
- func (kratosHydraAuth *KratosHydraAuth) FetchTokens(ctx context.Context, refresh_token string, userId string) (res interface{}, err error)
- func (kratosHydraAuth *KratosHydraAuth) GenerateRecoveryCode(ctx context.Context, recoveryIdentifier RecoveryPostBody, projectId string, ...) (msg string, err error)
- func (kratosHydraAuth *KratosHydraAuth) GetUser(ctx context.Context, userId string) (identity Identity, err error)
- func (kratosHydraAuth *KratosHydraAuth) GetUserInfo(ctx context.Context, access_token string) (identity Identity, err error)
- func (kratosHydraAuth *KratosHydraAuth) Login(ctx context.Context, loginPostBody LoginPostBody, withTokens bool) (identity Identity, loginSuccess LoginSuccess, err error)
- func (kratosHydraAuth *KratosHydraAuth) Logout(ctx context.Context, req *http.Request) (res interface{}, resStatusCode int, err error)
- func (kratosHydraAuth *KratosHydraAuth) MakeFromJson(ctx context.Context, rj *json.RawMessage) error
- func (kratosHydraAuth *KratosHydraAuth) PerformPreDeleteTask(ctx context.Context) (err error)
- func (kratosHydraAuth *KratosHydraAuth) PerformPreSaveTask(ctx context.Context) (err error)
- func (kratosHydraAuth *KratosHydraAuth) UpdateUser(ctx context.Context, identityToUpdate Identity, userId string, ...) (err error)
- func (kratosHydraAuth *KratosHydraAuth) VerifyRecovery(ctx context.Context, recoveryPassword RecoveryPassword) (rcMap map[string]string, cookies []*http.Cookie, err error)
- func (kratosHydraAuth *KratosHydraAuth) VerifyToken(ctx context.Context, tokenType string, token string) (res interface{}, err error)
- type KratosIdentity
- type KratosIdentityAddress
- type KratosLoginPostBody
- type KratosSession
- type KratosSessionBody
- type KratosUI
- type KratosUIMessage
- type KratosUINode
- type KratosUINodeAttributes
- type LoginPostBody
- type LoginSuccess
- type MsAuth
- func (msAuth *MsAuth) GetUrl(ctx context.Context, state string) (urlStr string, msParams MsParams, err error)
- func (msAuth *MsAuth) GetUserInfo(ctx context.Context, access_token string) (identity Identity, err error)
- func (msAuth *MsAuth) Login(ctx context.Context, loginPostBody LoginPostBody, withTokens bool) (identity Identity, loginSuccess LoginSuccess, err error)
- func (msAuth *MsAuth) MakeFromJson(ctx context.Context, rj *json.RawMessage) error
- func (msAuth *MsAuth) PerformPreDeleteTask(ctx context.Context) (err error)
- func (msAuth *MsAuth) PerformPreSaveTask(ctx context.Context) (err error)
- func (msAuth *MsAuth) RemoveUser(ctx context.Context, removeUser RemoveUser) (err error)
- type MsConfig
- type MsParams
- type RecoveryPassword
- type RecoveryPostBody
- type RegisterUser
- type RemoveUser
- type UserTraits
- type VerifyCode
- type VerifyPostBody
Constants ¶
View Source
const ( SELECT_IDENTITY_SUB = "select * from eruauth_identities where identity_provider_id = ???" INSERT_IDENTITY = "" /* 130-byte string literal not displayed */ UPDATE_IDENTITY = "update eruauth_identities set traits = ??? , attributes = ??? where identity_id = ???" INSERT_IDENTITY_CREDENTIALS = "" /* 151-byte string literal not displayed */ DELETE_IDENTITY_CREDENTIALS = "" /* 130-byte string literal not displayed */ INSERT_IDENTITY_PASSWORD = "insert into eruauth_identity_passwords (identity_password_id,identity_id,identity_password) values (??? , ??? , ???)" SELECT_LOGIN = "" /* 308-byte string literal not displayed */ SELECT_LOGIN_ID = "" /* 229-byte string literal not displayed */ SELECT_IDENTITY = "" /* 131-byte string literal not displayed */ SELECT_IDENTITY_CREDENTIAL = "" /* 178-byte string literal not displayed */ INSERT_OTP = "" /* 130-byte string literal not displayed */ VERIFY_OTP = "" /* 289-byte string literal not displayed */ VERIFY_RECOVERY_OTP = "" /* 267-byte string literal not displayed */ CHANGE_PASSWORD = "update eruauth_identity_passwords set updated_date=LOCALTIMESTAMP, identity_password= ??? where identity_id= ???" INSERT_DELETED_IDENTITY = "" /* 368-byte string literal not displayed */ DELETE_IDENTITY_PASSWORD = "delete from eruauth_identity_passwords where identity_id= ???" DELETE_IDENTITY_CREDENTIALS_ID = "delete from eruauth_identity_credentials where identity_id= ???" DELETE_IDENTITY = "delete from eruauth_identities where identity_id= ???" )
View Source
const ( OTP_PURPOSE_RECOVERY = "RECOVERY" OTP_PURPOSE_VERIFY = "VERIFY" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { AuthType string AuthName string TokenHeaderKey string Hooks AuthHooks `eru:"optional"` AuthDb AuthDbI `json:"-"` }
func (*Auth) ChangePassword ¶
func (*Auth) CompleteRecovery ¶
func (*Auth) FetchTokens ¶
func (*Auth) GenerateRecoveryCode ¶
func (*Auth) GenerateVerifyCode ¶
func (*Auth) GetAttribute ¶
func (*Auth) GetUserInfo ¶
func (*Auth) Login ¶
func (auth *Auth) Login(ctx context.Context, loginPostBody LoginPostBody, withTokens bool) (identity Identity, loginSuccess LoginSuccess, err error)
func (*Auth) MakeFromJson ¶
func (*Auth) PerformPreDeleteTask ¶
func (*Auth) PerformPreSaveTask ¶
func (*Auth) Register ¶
func (auth *Auth) Register(ctx context.Context, registerUser RegisterUser, projectId string) (identity Identity, loginSuccess LoginSuccess, err error)
func (*Auth) RemoveUser ¶
func (auth *Auth) RemoveUser(ctx context.Context, removeUser RemoveUser) (err error)
func (*Auth) UpdateUser ¶
func (*Auth) VerifyCode ¶
func (*Auth) VerifyRecovery ¶
type AuthDb ¶
func (*AuthDb) GetDbQuery ¶
type AuthDbI ¶
type AuthDbMysql ¶
type AuthDbMysql struct {
AuthDb
}
func (*AuthDbMysql) GetDbQuery ¶
func (authDbMysql *AuthDbMysql) GetDbQuery(ctx context.Context, query string) (finalQuery string)
type AuthDbPostgres ¶
type AuthDbPostgres struct {
AuthDb
}
func (*AuthDbPostgres) GetDbQuery ¶
func (authDbPostgres *AuthDbPostgres) GetDbQuery(ctx context.Context, query string) (finalQuery string)
type AuthI ¶
type AuthI interface { //Login(req *http.Request) (res interface{}, cookies []*http.Cookie, err error) SetAuthDb(authDbI AuthDbI) GetAuthDb() (authDbI AuthDbI) Login(ctx context.Context, loginPostBody LoginPostBody, withTokens bool) (identity Identity, loginSuccess LoginSuccess, err error) Register(ctx context.Context, registerUser RegisterUser, projectId string) (identity Identity, loginSuccess LoginSuccess, err error) RemoveUser(ctx context.Context, removeUser RemoveUser) (err error) Logout(ctx context.Context, req *http.Request) (res interface{}, resStatusCode int, err error) VerifyToken(ctx context.Context, tokenType string, token string) (res interface{}, err error) GetAttribute(ctx context.Context, attributeName string) (attributeValue interface{}, err error) GetUserInfo(ctx context.Context, access_token string) (identity Identity, err error) FetchTokens(ctx context.Context, refresh_token string, userId string) (res interface{}, err error) MakeFromJson(ctx context.Context, rj *json.RawMessage) (err error) PerformPreSaveTask(ctx context.Context) (err error) PerformPreDeleteTask(ctx context.Context) (err error) GetUser(ctx context.Context, userId string) (identity Identity, err error) UpdateUser(ctx context.Context, identityToUpdate Identity, userId string, token map[string]interface{}) (err error) ChangePassword(ctx context.Context, tokenObj map[string]interface{}, userId string, changePasswordObj ChangePassword) (err error) GenerateRecoveryCode(ctx context.Context, recoveryIdentifier RecoveryPostBody, projectId string, silentFlag bool) (msg string, err error) GenerateVerifyCode(ctx context.Context, verifyIdentifier VerifyPostBody, projectId string, silentFlag bool) (msg string, err error) CompleteRecovery(ctx context.Context, recoveryPassword RecoveryPassword, cookies []*http.Cookie) (msg string, err error) VerifyRecovery(ctx context.Context, recoveryPassword RecoveryPassword) (res map[string]string, cookies []*http.Cookie, err error) VerifyCode(ctx context.Context, verifyCode VerifyCode, tokenObj map[string]interface{}, withToken bool) (res interface{}, err error) GetUrl(ctx context.Context, state string) (url string, msParams MsParams, err error) }
type ChangePassword ¶
type EruAuth ¶
type EruAuth struct { Auth EruConfig EruConfig `json:"eruConfig" eru:"required"` Hydra HydraConfig `json:"hydra" eru:"required"` }
func (*EruAuth) ChangePassword ¶
func (*EruAuth) FetchTokens ¶
func (*EruAuth) GenerateRecoveryCode ¶
func (*EruAuth) GenerateVerifyCode ¶
func (*EruAuth) GetUserInfo ¶
func (*EruAuth) Login ¶
func (eruAuth *EruAuth) Login(ctx context.Context, loginPostBody LoginPostBody, withTokens bool) (identity Identity, loginSuccess LoginSuccess, err error)
func (*EruAuth) MakeFromJson ¶
func (*EruAuth) PerformPreDeleteTask ¶
func (*EruAuth) PerformPreSaveTask ¶
func (*EruAuth) Register ¶
func (eruAuth *EruAuth) Register(ctx context.Context, registerUser RegisterUser, projectId string) (identity Identity, loginSuccess LoginSuccess, err error)
func (*EruAuth) RemoveUser ¶
func (eruAuth *EruAuth) RemoveUser(ctx context.Context, removeUser RemoveUser) (err error)
func (*EruAuth) UpdateUser ¶
func (*EruAuth) VerifyCode ¶
type EruConfig ¶
type EruConfig struct {
Identifiers Identifiers `json:"identifiers" eru:"required"`
}
type HydraClient ¶
type HydraClient struct { ClientId string `json:"client_id"` ClientSecret string `json:"client_secret"` TokenEndpointAuthMethod string `json:"token_endpoint_auth_method"` RedirectURIs []string `json:"redirect_uris"` GrantTypes []string `json:"grant_types"` ResponseTypes []string `json:"response_types"` Scope string `json:"scope"` }
type HydraConfig ¶
type HydraConfig struct { PublicHost string PublicPort string PublicScheme string AdminHost string AdminPort string AdminScheme string AuthURL string TokenURL string HydraClients map[string]HydraClient }
func (HydraConfig) AcceptConsentRequest ¶
func (hydraConfig HydraConfig) AcceptConsentRequest(ctx context.Context, identityHolder map[string]interface{}, consentChallenge string, loginCookies []*http.Cookie) (tokens LoginSuccess, err error)
func (HydraConfig) AcceptLoginRequest ¶
func (HydraConfig) CreateHydraClient ¶
func (hydraConfig HydraConfig) CreateHydraClient(ctx context.Context, hydraClient HydraClient) (resp interface{}, headers http.Header, statusCode int, err error)
func (HydraConfig) DeleteHydraClient ¶
func (HydraConfig) GetAminUrl ¶
func (hydraConfig HydraConfig) GetAminUrl() (url string)
func (HydraConfig) GetHydraClient ¶
func (HydraConfig) GetLoginChallenge ¶
func (HydraConfig) GetOauthConfig ¶
func (HydraConfig) GetPublicUrl ¶
func (hydraConfig HydraConfig) GetPublicUrl() (url string)
func (HydraConfig) GetUserInfo ¶
func (HydraConfig) RemoveHydraClient ¶
func (hydraConfig HydraConfig) RemoveHydraClient(ctx context.Context, clientId string) (err error)
func (HydraConfig) SaveHydraClient ¶
func (hydraConfig HydraConfig) SaveHydraClient(ctx context.Context, hydraClient HydraClient) (err error)
func (HydraConfig) UpdateHydraClient ¶
func (hydraConfig HydraConfig) UpdateHydraClient(ctx context.Context, clientId string, hydraClient HydraClient) (resp interface{}, headers http.Header, statusCode int, err error)
type IdentifierConfig ¶
type Identifiers ¶
type Identifiers struct { Email IdentifierConfig `json:"email"` Mobile IdentifierConfig `json:"mobile"` Username IdentifierConfig `json:"userName"` }
type Identity ¶
type Identity struct { Id string `json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Attributes map[string]interface{} `json:"attributes"` AuthDetails IdentityAuth `json:"auth_details"` OtherInfo map[string]interface{} `json:"other_info"` Status string `json:"status"` }
type IdentityAuth ¶
type IdentityAuth struct { SessionToken string `json:"session_token"` SessionId string `json:"session_id"` SessionStatus bool `json:"session_status"` ExpiresAt time.Time `json:"expires_at"` AuthenticatedAt time.Time `json:"authenticated_at"` AuthenticatorAssuranceLevel string `json:"authenticator_assurance_level"` AuthenticationMethods []interface{} `json:"authentication_methods"` IssuedAt time.Time `json:"issued_at"` }
type KratosConfig ¶
type KratosDevice ¶
type KratosFlow ¶
type KratosFlow struct { Id string `json:"id"` Flowtype string `json:"type"` ExpiresAt time.Time `json:"expires_at"` IssuedAt time.Time `json:"issued_at"` RequestUrl string `json:"request_url"` UI KratosUI `json:"ui"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Refresh bool `json:"refresh"` RequestedAal string `json:"requested_aal"` }
type KratosHydraAuth ¶
type KratosHydraAuth struct { Auth Kratos KratosConfig Hydra HydraConfig }
func (*KratosHydraAuth) ChangePassword ¶
func (kratosHydraAuth *KratosHydraAuth) ChangePassword(ctx context.Context, tokenObj map[string]interface{}, userId string, changePassword ChangePassword) (err error)
func (*KratosHydraAuth) CompleteRecovery ¶
func (kratosHydraAuth *KratosHydraAuth) CompleteRecovery(ctx context.Context, recoveryPassword RecoveryPassword, cookies []*http.Cookie) (msg string, err error)
func (*KratosHydraAuth) FetchTokens ¶
func (*KratosHydraAuth) GenerateRecoveryCode ¶
func (kratosHydraAuth *KratosHydraAuth) GenerateRecoveryCode(ctx context.Context, recoveryIdentifier RecoveryPostBody, projectId string, silentFlag bool) (msg string, err error)
func (*KratosHydraAuth) GetUserInfo ¶
func (*KratosHydraAuth) Login ¶
func (kratosHydraAuth *KratosHydraAuth) Login(ctx context.Context, loginPostBody LoginPostBody, withTokens bool) (identity Identity, loginSuccess LoginSuccess, err error)
func (*KratosHydraAuth) MakeFromJson ¶
func (kratosHydraAuth *KratosHydraAuth) MakeFromJson(ctx context.Context, rj *json.RawMessage) error
func (*KratosHydraAuth) PerformPreDeleteTask ¶
func (kratosHydraAuth *KratosHydraAuth) PerformPreDeleteTask(ctx context.Context) (err error)
func (*KratosHydraAuth) PerformPreSaveTask ¶
func (kratosHydraAuth *KratosHydraAuth) PerformPreSaveTask(ctx context.Context) (err error)
func (*KratosHydraAuth) UpdateUser ¶
func (*KratosHydraAuth) VerifyRecovery ¶
func (kratosHydraAuth *KratosHydraAuth) VerifyRecovery(ctx context.Context, recoveryPassword RecoveryPassword) (rcMap map[string]string, cookies []*http.Cookie, err error)
func (*KratosHydraAuth) VerifyToken ¶
type KratosIdentity ¶
type KratosIdentity struct { Id string `json:"id"` SchemaId string `json:"schema_id"` SchemaUrl string `json:"schema_url"` State string `json:"state"` StateChangedAt time.Time `json:"state_changed_at"` Traits map[string]interface{} `json:"traits"` VerifiableAddresses []KratosIdentityAddress `json:"verifiable_addresses"` RecoveryAddresses []KratosIdentityAddress `json:"recovery_addresses"` MetaDataPublic map[string]interface{} `json:"metadata_public"` MetaDataAdmin map[string]interface{} `json:"metadata_admin"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type KratosIdentityAddress ¶
type KratosLoginPostBody ¶
type KratosSession ¶
type KratosSession struct { SessionToken string `json:"session_token"` Session KratosSessionBody `json:"session"` }
type KratosSessionBody ¶
type KratosSessionBody struct { Id string `json:"id"` Active bool `json:"active"` ExpiresAt time.Time `json:"expires_at"` AuthenticatedAt time.Time `json:"authenticated_at"` AuthenticatorAssuranceLevel string `json:"authenticator_assurance_level"` AuthenticationMethods []KratosAuthenticationMethods `json:"authentication_methods"` IssuedAt time.Time `json:"issued_at"` Identity KratosIdentity `json:"identity"` Devices []KratosDevice `json:"devices"` }
type KratosUI ¶
type KratosUI struct { Action string `json:"action"` Method string `json:"method"` Nodes []KratosUINode `json:"nodes"` Messages []KratosUIMessage `json:"messages"` }
type KratosUIMessage ¶
type KratosUINode ¶
type KratosUINode struct { NodeType string `json:"type"` Group string `json:"group"` Attributes KratosUINodeAttributes `json:"attributes"` Messages []KratosUIMessage `json:"messages"` Meta interface{} `json:"meta"` }
type KratosUINodeAttributes ¶
type LoginPostBody ¶
type LoginSuccess ¶
type MsAuth ¶
type MsAuth struct { Auth MsConfig MsConfig `json:"msConfig" eru:"required"` Hydra HydraConfig `json:"hydra" eru:"required"` }
func (*MsAuth) GetUserInfo ¶
func (*MsAuth) Login ¶
func (msAuth *MsAuth) Login(ctx context.Context, loginPostBody LoginPostBody, withTokens bool) (identity Identity, loginSuccess LoginSuccess, err error)
func (*MsAuth) MakeFromJson ¶
func (*MsAuth) PerformPreDeleteTask ¶
func (*MsAuth) PerformPreSaveTask ¶
func (*MsAuth) RemoveUser ¶
func (msAuth *MsAuth) RemoveUser(ctx context.Context, removeUser RemoveUser) (err error)
type MsConfig ¶
type MsConfig struct { ClientId string `json:"clientId" eru:"required"` ClientSecret string `json:"clientSecret" eru:"required"` RedirectURI string `json:"redirectUri" eru:"required"` Scope string `json:"scope" eru:"required"` SsoBaseUrl string `json:"ssoBaseUrl" eru:"required"` TokenUrl string `json:"tokenUrl" eru:"required"` JwkUrl string `json:"jwkUrl" eru:"required"` Identifiers Identifiers `json:"identifiers" eru:"required"` }
type MsParams ¶
type MsParams struct { ClientId string `json:"client_id"` Scope string `json:"scope"` RedirectURI string `json:"redirect_uri"` ClientRequestId string `json:"client-request-id"` ResponseMode string `json:"response_mode"` ResponseType string `json:"response_type"` CodeChallenge string `json:"code_challenge"` CodeVerifier string CodeChallengeMethod string `json:"code_challenge_method"` Nonce string `json:"nonce"` State string `json:"state"` Url string }
type RecoveryPassword ¶
type RecoveryPostBody ¶
type RecoveryPostBody struct {
Username string `json:"username"`
}
type RegisterUser ¶
type RegisterUser struct { UserTraits Password string `json:"password"` }
type RemoveUser ¶
type RemoveUser struct {
UserId string `json:"id"`
}
type UserTraits ¶
type VerifyCode ¶
type VerifyPostBody ¶
Click to show internal directories.
Click to hide internal directories.