Documentation
¶
Overview ¶
Package pkgtest provides utilities for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTestJWTExpiresAt ¶
GenerateTestJWTExpiresAt generates a JWT with the given expiration time. The generated JWT is signed with the testKey.
func NewTestVerifier ¶
func NewTestVerifier(clock func() time.Time) *oidc.IDTokenVerifier
NewTestVerifier returns a new IDTokenVerifier that uses the testKey for signing.
Types ¶
type TestOIDCConfiguration ¶
type TestOIDCConfiguration struct {
Verifier *oidc.IDTokenVerifier
UsernameClaim string
// contains filtered or unexported fields
}
TestOIDCConfiguration is a test implementation of OIDCConfiguration.
func (*TestOIDCConfiguration) GetUsernameClaim ¶
func (c *TestOIDCConfiguration) GetUsernameClaim() string
func (*TestOIDCConfiguration) GetVerifier ¶
func (c *TestOIDCConfiguration) GetVerifier(_ context.Context) (*oidc.IDTokenVerifier, error)
func (*TestOIDCConfiguration) Now ¶
func (c *TestOIDCConfiguration) Now() time.Time
Click to show internal directories.
Click to hide internal directories.