Documentation ¶
Index ¶
- func AuthenticationMiddleware() gin.HandlerFunc
- func NewEnforcer() (*casbin.Enforcer, error)
- type BindataPolicyAdapter
- func (a *BindataPolicyAdapter) AddPolicy(sec string, ptype string, rule []string) error
- func (a *BindataPolicyAdapter) LoadPolicy(model model.Model) error
- func (a *BindataPolicyAdapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
- func (a *BindataPolicyAdapter) RemovePolicy(sec string, ptype string, rule []string) error
- func (a *BindataPolicyAdapter) SavePolicy(model model.Model) error
- type IDTokenClaims
- type Roles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticationMiddleware ¶
func AuthenticationMiddleware() gin.HandlerFunc
func NewEnforcer ¶
Types ¶
type BindataPolicyAdapter ¶
type BindataPolicyAdapter struct { }
func NewBindataPolicyAdapter ¶
func NewBindataPolicyAdapter() *BindataPolicyAdapter
func (*BindataPolicyAdapter) AddPolicy ¶
func (a *BindataPolicyAdapter) AddPolicy(sec string, ptype string, rule []string) error
AddPolicy adds a policy rule to the storage.
func (*BindataPolicyAdapter) LoadPolicy ¶
func (a *BindataPolicyAdapter) LoadPolicy(model model.Model) error
LoadPolicy loads all policy rules from the storage.
func (*BindataPolicyAdapter) RemoveFilteredPolicy ¶
func (a *BindataPolicyAdapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
RemoveFilteredPolicy removes policy rules that match the filter from the storage.
func (*BindataPolicyAdapter) RemovePolicy ¶
func (a *BindataPolicyAdapter) RemovePolicy(sec string, ptype string, rule []string) error
RemovePolicy removes a policy rule from the storage.
func (*BindataPolicyAdapter) SavePolicy ¶
func (a *BindataPolicyAdapter) SavePolicy(model model.Model) error
SavePolicy saves all policy rules to the storage.
type IDTokenClaims ¶
type IDTokenClaims struct { Acr string `json:"acr"` AllowedOrigins []string `json:"allowed-origins"` Aud string `json:"aud"` AuthTime int `json:"auth_time"` Azp string `json:"azp"` Email string `json:"email"` Exp int `json:"exp"` FamilyName string `json:"family_name"` GivenName string `json:"given_name"` Iat int `json:"iat"` Iss string `json:"iss"` Jti string `json:"jti"` Name string `json:"name"` Nbf int `json:"nbf"` Nonce string `json:"nonce"` PreferredUsername string `json:"preferred_username"` RealmAccess Roles `json:"realm_access"` ResourceAccess map[string]Roles `json:"resource_access"` SessionState string `json:"session_state"` Sub string `json:"sub"` Typ string `json:"typ"` }
Click to show internal directories.
Click to hide internal directories.