e2eframework

package
v0.54.0-beta.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SignatureAlgorithm = jose.RS256

Variables

View Source
var (
	WebKey jose.JSONWebKey
	Signer jose.Signer
)

Functions

func NewAccessToken

func NewAccessToken(issuer, subject string, audience []string, expiration time.Time, jwtid, clientID string, skew time.Duration) (string, *oidc.AccessTokenClaims)

NewAccessToken creates a new AccessTokenClaims with passed data and returns a signed token and claims.

func NewAccessTokenCustom

func NewAccessTokenCustom(issuer, subject string, audience []string, expiration time.Time, jwtid, clientID string, skew time.Duration, custom map[string]any) (string, *oidc.AccessTokenClaims)

func NewIDToken

func NewIDToken(issuer, subject string, audience []string, expiration, authTime time.Time, nonce string, acr string, amr []string, clientID string, skew time.Duration, atHash string) (string, *oidc.IDTokenClaims)

NewIDToken creates a new IDTokenClaims with passed data and returns a signed token and claims.

func NewIDTokenCustom

func NewIDTokenCustom(issuer, subject string, audience []string, expiration, authTime time.Time, nonce string, acr string, amr []string, clientID string, skew time.Duration, atHash string, custom map[string]any) (string, *oidc.IDTokenClaims)

func ValidAccessToken

func ValidAccessToken(issuer string) (string, *oidc.AccessTokenClaims)

ValidAccessToken returns a token and claims that are in the token. It uses the Valid* global variables and the token always passes verification within the same test run.

func ValidIDToken

func ValidIDToken(issuer string) (string, *oidc.IDTokenClaims)

ValidIDToken returns a token and claims that are in the token. It uses the Valid* global variables and the token will always pass verification.

Types

type KeySet

type KeySet struct{}

KeySet implements oidc.Keys

func (KeySet) VerifySignature

func (KeySet) VerifySignature(ctx context.Context, jws *jose.JSONWebSignature) (payload []byte, err error)

VerifySignature implments op.KeySet.

Jump to

Keyboard shortcuts

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