authclaims

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithAuthClaims

func ContextWithAuthClaims(parent context.Context, claims *AuthClaims) context.Context

ContextWithAuthClaims injects the provided AuthClaims into the parent context.

func ContextWithSkipAuthzCheck

func ContextWithSkipAuthzCheck(parent context.Context, skipAuthzCheck bool) context.Context

ContextWithSkipAuthzCheck attaches whether to skip authz check to the parent context.

func SkipAuthzCheckFromContext

func SkipAuthzCheckFromContext(ctx context.Context) bool

SkipAuthzCheckFromContext returns whether the authorize check can be skipped.

Types

type AuthClaims

type AuthClaims struct {
	Subject  string
	Scopes   map[string]bool
	ClientID string
}

AuthClaims contains claims that are included in OIDC standard claims. https://openid.net/specs/openid-connect-core-1_0.html#IDToken

func AuthClaimsFromContext

func AuthClaimsFromContext(ctx context.Context) (*AuthClaims, bool)

AuthClaimsFromContext extracts the AuthClaims from the provided ctx (if any).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL