fake

package
v1.0.33 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyID            = "fake-key-id"
	FakeIssuer       = "fake-issuer"
	FakeAudience     = "fake-users"
	PermissionsClaim = "perm"
)
View Source
const PrivateKey = `` /* 226-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeAuthenticator

type FakeAuthenticator struct {
	PrivateKey *ecdsa.PrivateKey
	KeySet     jwk.Set
}

func NewFakeAuthenticator

func NewFakeAuthenticator() (*FakeAuthenticator, error)

NewFakeAuthenticator ...

func (*FakeAuthenticator) CreateJWSWithClaims

func (f *FakeAuthenticator) CreateJWSWithClaims(claims []string) ([]byte, error)

CreateJWSWithClaims is a helper function to create JWT's with the specified claims.

func (*FakeAuthenticator) SignToken

func (f *FakeAuthenticator) SignToken(t jwt.Token) ([]byte, error)

SignToken ...

func (*FakeAuthenticator) ValidateJWS

func (f *FakeAuthenticator) ValidateJWS(jwsString string) (jwt.Token, error)

ValidateJWS ...

Jump to

Keyboard shortcuts

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