Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthTokenValidator ¶
type AuthTokenValidator interface { Initialize() Validate(token string, permission *Permission, namespace *string, userId *string) error }
func NewTokenValidator ¶
func NewTokenValidator(authService iam.OAuth20Service, refreshInterval time.Duration) AuthTokenValidator
type JWTClaims ¶
type JWTClaims struct { Namespace string `json:"namespace"` DisplayName string `json:"display_name"` Roles []string `json:"roles"` NamespaceRoles []NamespaceRole `json:"namespace_roles"` Permissions []Permission `json:"permissions"` Bans []JWTBan `json:"bans"` JusticeFlags int `json:"jflgs"` Scope string `json:"scope"` Country string `json:"country"` ClientID string `json:"client_id"` IsComply bool `json:"is_comply"` StudioNamespace string `json:"studio_namespace,omitempty"` jwt.Claims }
JWTClaims holds data stored in a JWT access token with additional Justice Flags field
type NamespaceRole ¶
type Permission ¶
type Role ¶
type Role struct { RoleID string `json:"RoleId"` RoleName string Permissions []Permission }
Role holds info about a user role.
type TokenValidator ¶ added in v0.49.0
type TokenValidator struct { AuthService iam.OAuth20Service RefreshInterval time.Duration Filter *bloom.Filter JwkSet *iamclientmodels.OauthcommonJWKSet JwtClaims JWTClaims JwtEncoding base64.Encoding LocalValidationActive bool PublicKeys map[string]*rsa.PublicKey RevokedUsers map[string]time.Time Roles map[string]*iamclientmodels.ModelRoleResponseV3 // contains filtered or unexported fields }
func (*TokenValidator) Initialize ¶ added in v0.49.0
func (v *TokenValidator) Initialize()
func (*TokenValidator) Validate ¶ added in v0.49.0
func (v *TokenValidator) Validate(token string, permission *Permission, namespace *string, userId *string) error
Click to show internal directories.
Click to hide internal directories.