Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrCodeInvalidCredentials router.ErrCode = "invalid_credentials" ErrCodeInvalidToken router.ErrCode = "invalid_token" ErrCodeLoginEmpty router.ErrCode = "login_empty" ErrCodePasswordEmpty router.ErrCode = "password_empty" ErrCodePasswordLength router.ErrCode = "password_length" ErrCodeFailedToLogout router.ErrCode = "failed_to_logout" ErrCodeFailedToGetUser router.ErrCode = "failed_to_get_user" ErrCodeFailedToPatchUser router.ErrCode = "failed_to_patch_user" ErrCodeFailedToGetUserCredentials router.ErrCode = "failed_to_get_user_credentials" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CredentialsArgon2id ¶
type CredentialsArgon2id struct { ID uint `json:"id" db:"id"` Login string `json:"login" db:"login"` Hash string `json:"hash" db:"hash"` Type string `json:"type" db:"type"` Iterations uint32 `json:"iterations" db:"iterations"` Memory uint32 `json:"memory" db:"memory"` Parallelism uint8 `json:"parallelism" db:"parallelism"` Salt string `json:"salt" db:"salt"` KeyLen uint32 `json:"key_len" db:"key_len"` CreatedAt int64 `json:"created_at" db:"created_at"` UpdatedAt int64 `json:"updated_at" db:"updated_at"` DeletedAt *int64 `json:"deleted_at,omitempty" db:"deleted_at"` }
CredentialsArgon2id is the login method that uses Argon2id algorithm to hash the password.
type CredentialsMethods ¶
type CredentialsMethods struct { Name CredentialsType `json:"name"` Description string `json:"description"` }
type CredentialsType ¶
type CredentialsType string
const CredentialsTypeLoginPassword CredentialsType = "Login and password"
type Session ¶
type Session struct { ID uint `json:"id" db:"id"` Token string `json:"token" db:"token"` UserID uint `json:"user,omitempty" db:"user_id"` CreatedAt int64 `json:"created_at" db:"created_at"` UpdatedAt int64 `json:"updated_at" db:"updated_at"` DeletedAt *int64 `json:"deleted_at,omitempty" db:"deleted_at"` }
Click to show internal directories.
Click to hide internal directories.