jarm

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeParameters

func EncodeParameters(token, _ string, tErr error) (parameters url.Values, err error)

EncodeParameters takes the result from jarm.Generate and turns it into parameters in the form of url.Values.

func Generate

func Generate(ctx context.Context, config Configurator, client Client, session any, in url.Values) (token, signature string, err error)

Generate generates the token and signature for a JARM response.

Types

type Client

type Client interface {
	GetID() string
	GetAuthorizationSignedResponseKeyID() (kid string)
	GetAuthorizationSignedResponseAlg() (alg string)
	GetAuthorizationEncryptedResponseAlg() (alg string)
	GetAuthorizationEncryptedResponseEncryptionAlg() (alg string)
}

type Configurator

type Configurator interface {
	GetJWTSecuredAuthorizeResponseModeIssuer(ctx context.Context) string
	GetJWTSecuredAuthorizeResponseModeSigner(ctx context.Context) jwt.Signer
	GetJWTSecuredAuthorizeResponseModeLifespan(ctx context.Context) time.Duration
}

type JWTSessionContainer

type JWTSessionContainer interface {
	GetJWTHeader() *jwt.Headers
	GetJWTClaims() jwt.JWTClaimsContainer
}

type OpenIDSession

type OpenIDSession interface {
	IDTokenHeaders() *jwt.Headers
	IDTokenClaims() *jwt.IDTokenClaims
}

Jump to

Keyboard shortcuts

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