Documentation ¶
Index ¶
- func GetAccounts(ctx context.Context, kubeClient kubernetes.Interface) (map[string]Account, error)
- func VerifyInitialPassword(password, hashedPassword string) error
- func VerifyPassword(password, hashedPassword string) error
- type Account
- type Authenticator
- type IDTokenClaims
- type LoginCredentials
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccounts ¶ added in v1.1.0
GetAccounts returns list of configured accounts
func VerifyInitialPassword ¶ added in v1.1.0
VerifyInitialPassword verifies the initial password for the admin user from the Accounts object
func VerifyPassword ¶ added in v1.1.0
VerifyPassword verifies the password(hashed) for the users from its respective Accounts object
Types ¶
type Account ¶ added in v1.1.0
Account holds local account information
func GetAccount ¶ added in v1.1.0
func GetAccount(ctx context.Context, name string, kubeClient kubernetes.Interface) (*Account, error)
GetAccount return an account info by the specified name.
type Authenticator ¶
type IDTokenClaims ¶
type IDTokenClaims struct { Iss string `json:"iss"` Sub string `json:"sub"` Aud string `json:"aud"` Exp int `json:"exp"` Iat int `json:"iat"` AtHash string `json:"at_hash"` CHash string `json:"c_hash"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` Groups []string `json:"groups"` Name string `json:"name"` PreferredUsername string `json:"preferred_username"` }
IDTokenClaims is the claims extract from the IDToken.
type LoginCredentials ¶ added in v1.1.0
type LoginCredentials struct { Username string `json:"username"` Password string `json:"password"` }
LoginCredentials includes the user information It holds the username and password for the user used for local user authentication
type UserInfo ¶
type UserInfo struct { IDTokenClaims *IDTokenClaims `json:"id_token_claims,omitempty"` IDToken string `json:"id_token"` RefreshToken string `json:"refresh_token"` }
UserInfo includes information about the user identity It holds the IDTokenClaims, IDToken and RefreshToken for the user
func NewUserInfo ¶
func NewUserInfo(itc *IDTokenClaims, idToken string, refreshToken string) UserInfo
Click to show internal directories.
Click to hide internal directories.