Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyCloakAuth ¶
func KeyCloakAuth(conf GCloakConf, accessMap map[string][]string) gin.HandlerFunc
func TokenHandler ¶
func TokenHandler(conf GCloakConf) gin.HandlerFunc
Types ¶
type GCloakConf ¶
type KeyCloakToken ¶
type KeyCloakToken struct { Jti string `json:"jti,omitempty"` Exp int64 `json:"exp"` Nbf int64 `json:"nbf"` Iat int64 `json:"iat"` Iss string `json:"iss"` Sub string `json:"sub"` Typ string `json:"typ"` Azp string `json:"azp,omitempty"` Nonce string `json:"nonce,omitempty"` AuthTime int64 `json:"auth_time,omitempty"` SessionState string `json:"session_state,omitempty"` Acr string `json:"acr,omitempty"` ClientSession string `json:"client_session,omitempty"` AllowedOrigins []string `json:"allowed-origins,omitempty"` ResourceAccess map[string]ServiceRole `json:"resource_access,omitempty"` Name string `json:"name"` PreferredUsername string `json:"preferred_username"` GivenName string `json:"given_name,omitempty"` FamilyName string `json:"family_name,omitempty"` Email string `json:"email,omitempty"` RealmAccess ServiceRole `json:"realm_access,omitempty"` }
type ServiceRole ¶
type ServiceRole struct {
Roles []string `json:"roles"`
}
Click to show internal directories.
Click to hide internal directories.