Documentation
¶
Overview ¶
Package validator provides structures responsible for validating tokens according to custom policies
Index ¶
Constants ¶
View Source
const ( NOT = "NOT" ANY = "ANY" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JwtTokenValidator ¶
type JwtTokenValidator struct{}
JwtTokenValidator implements the TokenValidator
func (*JwtTokenValidator) Validate ¶
func (*JwtTokenValidator) Validate(tokenStr string, tokenType Token, jwks keyset.KeySet, rules []v1.Rule, userInfoEndpoint string) *errors.OAuthError
Validate validates tokens according to the specified policies. If any policy fails, the entire request should be rejected
type OidcTokenValidator ¶
type OidcTokenValidator struct{}
OidcTokenValidator implements the TokenValidator
func (*OidcTokenValidator) Validate ¶
func (o *OidcTokenValidator) Validate(tokenStr string, tokenType Token, jwks keyset.KeySet, rules []v1.Rule, userInfoEndpoint string) *errors.OAuthError
Validate validates tokens according to the specified policies. If any policy fails, the entire request should be rejected
type RawTokens ¶
RawTokens - holds references to raw access and id tokens empty tokens are represented with ""
type TokenValidator ¶
type TokenValidator interface {
Validate(token string, tokenType Token, jwks keyset.KeySet, rules []v1.Rule, userInfoEndpoint string) *errors.OAuthError
}
TokenValidator parses and validates JWT tokens according to policies
func NewTokenValidator ¶
func NewTokenValidator(policyType policy.Type) TokenValidator
New creates a New TokenValidator
Click to show internal directories.
Click to hide internal directories.