authclaims

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 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 creates a copy of the parent context with the provided AuthClaims.

func ContextWithSkipAuthzCheck

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

ContextWithSkipAuthzCheck creates a copy of the parent context and attaches whether to skip authz check to.

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