clientutil

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClientNotIdentified = goidc.NewError(goidc.ErrorCodeInvalidClient,
	"could not identify the client")

Functions

func AreScopesAllowed

func AreScopesAllowed(
	c *goidc.Client,
	availableScopes []goidc.Scope,
	requestedScopes string,
) bool

func Authenticated

func Authenticated(
	ctx oidc.Context,
	authnCtx AuthnContext,
) (
	*goidc.Client,
	error,
)

Authenticated fetches a client associated to the request and returns it if the client is authenticated according to its authentication method. This function always returns in case of error an instance of goidc.Error with error code as goidc.ErrorCodeInvalidClient.

func JWKByAlg

func JWKByAlg(ctx oidc.Context, c *goidc.Client, alg string) (goidc.JSONWebKey, error)

JWKByAlg returns a client JWK based on the algorithm.

func JWKByKeyID

func JWKByKeyID(ctx oidc.Context, c *goidc.Client, keyID string) (goidc.JSONWebKey, error)

func JWKMatchingHeader added in v0.6.0

func JWKMatchingHeader(
	ctx oidc.Context,
	c *goidc.Client,
	header jose.Header,
) (
	goidc.JSONWebKey,
	error,
)

Types

type AuthnContext added in v0.4.0

type AuthnContext string
const (
	TokenAuthnContext              AuthnContext = "token"
	TokenIntrospectionAuthnContext AuthnContext = "token_introspection"
	TokenRevocationAuthnContext    AuthnContext = "token_revocation"
)

Jump to

Keyboard shortcuts

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