Documentation ¶
Index ¶
- Constants
- func ClaimsPrincipalFromClaimsMap(claimsMap map[string]interface{}) claimsprincipalContracts.IClaimsPrincipal
- func FinalAuthVerificationMiddleware(container di.Container) grpc.UnaryServerInterceptor
- func FinalAuthVerificationMiddlewareUsingClaimsMap(grpcEntrypointClaimsMap map[string]*middleware_oidc.EntryPointConfig) grpc.UnaryServerInterceptor
- func FinalAuthVerificationMiddlewareUsingClaimsMapWithTrustOption(grpcEntrypointClaimsMap map[string]*middleware_oidc.EntryPointConfig, ...) grpc.UnaryServerInterceptor
- func FinalAuthVerificationMiddlewareUsingClaimsMapWithZeroTrust(grpcEntrypointClaimsMap map[string]*middleware_oidc.EntryPointConfig) grpc.UnaryServerInterceptor
- func OAuth2UnaryServerInterceptor(oauth2Context *OAuth2Context) grpc.UnaryServerInterceptor
- type DiscoveryDocument
- type DiscoveryDocumentOptions
- type GrpcFuncAuthConfig
- type JWTValidator
- type JWTValidatorOptions
- type MethodClaims
- type OAuth2Context
- type OAuth2DiscoveryOptions
- type OAuth2Document
Constants ¶
const (
OptionsCannotBeNil = "options cannot be nil"
)
Variables ¶
This section is empty.
Functions ¶
func ClaimsPrincipalFromClaimsMap ¶ added in v0.1.85
func ClaimsPrincipalFromClaimsMap(claimsMap map[string]interface{}) claimsprincipalContracts.IClaimsPrincipal
ClaimsPrincipalFromClaimsMap ...
func FinalAuthVerificationMiddleware ¶
func FinalAuthVerificationMiddleware(container di.Container) grpc.UnaryServerInterceptor
FinalAuthVerificationMiddleware evaluates the claims principal
func FinalAuthVerificationMiddlewareUsingClaimsMap ¶ added in v0.1.146
func FinalAuthVerificationMiddlewareUsingClaimsMap(grpcEntrypointClaimsMap map[string]*middleware_oidc.EntryPointConfig) grpc.UnaryServerInterceptor
FinalAuthVerificationMiddlewareUsingClaimsMap evaluates the claims principal
func FinalAuthVerificationMiddlewareUsingClaimsMapWithTrustOption ¶ added in v0.1.147
func FinalAuthVerificationMiddlewareUsingClaimsMapWithTrustOption(grpcEntrypointClaimsMap map[string]*middleware_oidc.EntryPointConfig, enableZeroTrust bool) grpc.UnaryServerInterceptor
FinalAuthVerificationMiddlewareUsingClaimsMapWithTrustOption evaluates the claims principal
func FinalAuthVerificationMiddlewareUsingClaimsMapWithZeroTrust ¶ added in v0.1.147
func FinalAuthVerificationMiddlewareUsingClaimsMapWithZeroTrust(grpcEntrypointClaimsMap map[string]*middleware_oidc.EntryPointConfig) grpc.UnaryServerInterceptor
FinalAuthVerificationMiddlewareUsingClaimsMapWithZeroTrust evaluates the claims principal
func OAuth2UnaryServerInterceptor ¶
func OAuth2UnaryServerInterceptor(oauth2Context *OAuth2Context) grpc.UnaryServerInterceptor
OAuth2UnaryServerInterceptor ...
Types ¶
type DiscoveryDocument ¶
type DiscoveryDocument struct { OAuth2Document *OAuth2Document Options *DiscoveryDocumentOptions DiscoveryURL url.URL Algorithms []string `json:"id_token_signing_alg_values_supported"` IntrospectionEndpoint string Issuer string `json:"issuer"` JWKSURL string `json:"jwks_uri"` }
DiscoveryDocument ...
func (DiscoveryDocument) MarshalZerologObject ¶
func (p DiscoveryDocument) MarshalZerologObject(e *zerolog.Event)
type DiscoveryDocumentOptions ¶
type DiscoveryDocumentOptions struct { Authority string OAuth2DiscoveryOptions OAuth2DiscoveryOptions }
DiscoveryDocumentOptions ...
type GrpcFuncAuthConfig ¶
type GrpcFuncAuthConfig struct { Authority string ExpectedScheme string ClockSkewMinutes int FullMethodNameToClaims map[string]MethodClaims }
GrpcFuncAuthConfig ...
func NewGrpcFuncAuthConfig ¶
func NewGrpcFuncAuthConfig(authority string, expectedScheme string, clockSkewMinutes int) *GrpcFuncAuthConfig
NewGrpcFuncAuthConfig ...
type JWTValidator ¶
type JWTValidator struct {
Options *JWTValidatorOptions
}
JWTValidator struct
func NewJWTValidator ¶
func NewJWTValidator(options *JWTValidatorOptions) *JWTValidator
NewJWTValidator creates a new *JWTValidator
func (*JWTValidator) ParseToken ¶
func (jwtValidator *JWTValidator) ParseToken(ctx context.Context, accessToken string) (claimsprincipalContracts.IClaimsPrincipal, error)
ParseToken validates an produces a claims principal
type JWTValidatorOptions ¶
type JWTValidatorOptions struct { OAuth2Document *OAuth2Document ClockSkewMinutes int }
JWTValidatorOptions is a struct for specifying configuration options.
type MethodClaims ¶
type MethodClaims struct { OR []claimsprincipalContracts.Claim AND []claimsprincipalContracts.Claim }
MethodClaims ...
type OAuth2Context ¶
type OAuth2Context struct { OAuth2Document *OAuth2Document JWTValidator *JWTValidator Scheme string Config *GrpcFuncAuthConfig }
OAuth2Context ...
func BuildOAuth2Context ¶
func BuildOAuth2Context(issuer string, JWKSURL string, config *GrpcFuncAuthConfig) (*OAuth2Context, error)
BuildOAuth2Context ...
func BuildOpenIdConnectContext ¶
func BuildOpenIdConnectContext(config *GrpcFuncAuthConfig) (*OAuth2Context, error)
BuildOpenIdConnectContext ...
type OAuth2DiscoveryOptions ¶
type OAuth2DiscoveryOptions struct {
JWKSURL string
}
OAuth2DiscoveryOptions ...
type OAuth2Document ¶
type OAuth2Document struct { Options *OAuth2DiscoveryOptions Issuer string `json:"issuer"` JWKSURL string `json:"jwks_uri"` // contains filtered or unexported fields }
OAuth2Document ...
func (OAuth2Document) MarshalZerologObject ¶
func (p OAuth2Document) MarshalZerologObject(e *zerolog.Event)