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 ...
Click to show internal directories.
Click to hide internal directories.