Documentation ¶
Index ¶
- Variables
- func DecodeIDToken(t *testing.T, token *oauth2.Token) gjson.Result
- func FlexibleServer(t *testing.T, h *http.HandlerFunc) string
- func HTTPServerNoExpectedCallHandler(t *testing.T) http.HandlerFunc
- func HTTPServerNotImplementedHandler(w http.ResponseWriter, _ *http.Request)
- func IntrospectToken(t *testing.T, conf *oauth2.Config, token string, adminTS *httptest.Server) gjson.Result
- func JanitorTests(conf *config.Provider, consentManager consent.Manager, ...) func(t *testing.T)
- func NewCallbackURL(t *testing.T, prefix string, h http.HandlerFunc) string
- func NewEmptyCookieJar(t *testing.T) *cookiejar.Jar
- func NewEmptyJarClient(t *testing.T) *http.Client
- func NewIDToken(t *testing.T, reg driver.Registry, subject string) string
- func NewIDTokenWithClaims(t *testing.T, reg driver.Registry, claims djwt.MapClaims) string
- func NewIDTokenWithExpiry(t *testing.T, reg driver.Registry, subject string, exp time.Duration) string
- func NewLoginConsentUI(t *testing.T, c *config.Provider, login, consent http.HandlerFunc)
- func NewOAuth2Server(t *testing.T, reg driver.Registry) (publicTS, adminTS *httptest.Server)
- func RequireEqualDuration(t *testing.T, expected time.Duration, actual time.Duration, ...)
- func RequireEqualTime(t *testing.T, expected time.Time, actual time.Time, precision time.Duration)
- func UpdateClientTokenLifespans(t *testing.T, conf *oauth2.Config, clientID string, ...)
- func Userinfo(t *testing.T, token *oauth2.Token, publicTS *httptest.Server) gjson.Result
- type JanitorConsentTestHelper
- func (j *JanitorConsentTestHelper) AccessTokenNotAfterSetup(ctx context.Context, cl client.Manager, store x.FositeStorer) func(t *testing.T)
- func (j *JanitorConsentTestHelper) AccessTokenNotAfterValidate(ctx context.Context, notAfter time.Time, store x.FositeStorer) func(t *testing.T)
- func (j *JanitorConsentTestHelper) ConsentRejectionSetup(ctx context.Context, cm consent.Manager, cl client.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) ConsentRejectionValidate(ctx context.Context, cm consent.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) ConsentTimeoutSetup(ctx context.Context, cm consent.Manager, cl client.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) ConsentTimeoutValidate(ctx context.Context, cm consent.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) GetAccessTokenLifespan() time.Duration
- func (j *JanitorConsentTestHelper) GetConfig() *config.Provider
- func (j *JanitorConsentTestHelper) GetConsentRequestLifespan() time.Duration
- func (j *JanitorConsentTestHelper) GetDSN() string
- func (j *JanitorConsentTestHelper) GetNotAfterTestCycles() map[string]time.Duration
- func (j *JanitorConsentTestHelper) GetRefreshTokenLifespan() time.Duration
- func (j *JanitorConsentTestHelper) GetRegistry(ctx context.Context, dbname string) (driver.Registry, error)
- func (j *JanitorConsentTestHelper) GrantNotAfterSetup(ctx context.Context, cl client.Manager, gr trust.GrantManager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) GrantNotAfterValidate(ctx context.Context, notAfter time.Time, gr trust.GrantManager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) LimitSetup(ctx context.Context, cm consent.Manager, cl client.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) LimitValidate(ctx context.Context, cm consent.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) LoginConsentNotAfterSetup(ctx context.Context, cm consent.Manager, cl client.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) LoginConsentNotAfterValidate(ctx context.Context, notAfter time.Time, consentRequestLifespan time.Time, ...) func(t *testing.T)
- func (j *JanitorConsentTestHelper) LoginRejectionSetup(ctx context.Context, cm consent.Manager, cl client.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) LoginRejectionValidate(ctx context.Context, cm consent.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) LoginTimeoutSetup(ctx context.Context, cm consent.Manager, cl client.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) LoginTimeoutValidate(ctx context.Context, cm consent.Manager) func(t *testing.T)
- func (j *JanitorConsentTestHelper) RefreshTokenNotAfterSetup(ctx context.Context, cl client.Manager, store x.FositeStorer) func(t *testing.T)
- func (j *JanitorConsentTestHelper) RefreshTokenNotAfterValidate(ctx context.Context, notAfter time.Time, store x.FositeStorer) func(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
View Source
var TestLifespans = client.UpdateOAuth2ClientLifespans{ AuthorizationCodeGrantAccessTokenLifespan: x.NullDuration{Duration: 31 * time.Hour, Valid: true}, AuthorizationCodeGrantIDTokenLifespan: x.NullDuration{Duration: 32 * time.Hour, Valid: true}, AuthorizationCodeGrantRefreshTokenLifespan: x.NullDuration{Duration: 33 * time.Hour, Valid: true}, ClientCredentialsGrantAccessTokenLifespan: x.NullDuration{Duration: 34 * time.Hour, Valid: true}, ImplicitGrantAccessTokenLifespan: x.NullDuration{Duration: 35 * time.Hour, Valid: true}, ImplicitGrantIDTokenLifespan: x.NullDuration{Duration: 36 * time.Hour, Valid: true}, JwtBearerGrantAccessTokenLifespan: x.NullDuration{Duration: 37 * time.Hour, Valid: true}, PasswordGrantAccessTokenLifespan: x.NullDuration{Duration: 38 * time.Hour, Valid: true}, PasswordGrantRefreshTokenLifespan: x.NullDuration{Duration: 39 * time.Hour, Valid: true}, RefreshTokenGrantIDTokenLifespan: x.NullDuration{Duration: 40 * time.Hour, Valid: true}, RefreshTokenGrantAccessTokenLifespan: x.NullDuration{Duration: 41 * time.Hour, Valid: true}, RefreshTokenGrantRefreshTokenLifespan: x.NullDuration{Duration: 42 * time.Hour, Valid: true}, }
Functions ¶
func FlexibleServer ¶
func FlexibleServer(t *testing.T, h *http.HandlerFunc) string
func HTTPServerNoExpectedCallHandler ¶
func HTTPServerNoExpectedCallHandler(t *testing.T) http.HandlerFunc
func HTTPServerNotImplementedHandler ¶
func HTTPServerNotImplementedHandler(w http.ResponseWriter, _ *http.Request)
func IntrospectToken ¶
func JanitorTests ¶
func NewCallbackURL ¶
func NewIDTokenWithClaims ¶
func NewIDTokenWithExpiry ¶
func NewLoginConsentUI ¶
func NewOAuth2Server ¶
func RequireEqualDuration ¶
func RequireEqualTime ¶
Types ¶
type JanitorConsentTestHelper ¶
type JanitorConsentTestHelper struct { Lifespan time.Duration // contains filtered or unexported fields }
func NewConsentJanitorTestHelper ¶
func NewConsentJanitorTestHelper(uniqueName string) *JanitorConsentTestHelper
func (*JanitorConsentTestHelper) AccessTokenNotAfterSetup ¶
func (j *JanitorConsentTestHelper) AccessTokenNotAfterSetup(ctx context.Context, cl client.Manager, store x.FositeStorer) func(t *testing.T)
func (*JanitorConsentTestHelper) AccessTokenNotAfterValidate ¶
func (j *JanitorConsentTestHelper) AccessTokenNotAfterValidate(ctx context.Context, notAfter time.Time, store x.FositeStorer) func(t *testing.T)
func (*JanitorConsentTestHelper) ConsentRejectionSetup ¶
func (*JanitorConsentTestHelper) ConsentRejectionValidate ¶
func (*JanitorConsentTestHelper) ConsentTimeoutSetup ¶
func (*JanitorConsentTestHelper) ConsentTimeoutValidate ¶
func (*JanitorConsentTestHelper) GetAccessTokenLifespan ¶
func (j *JanitorConsentTestHelper) GetAccessTokenLifespan() time.Duration
func (*JanitorConsentTestHelper) GetConfig ¶
func (j *JanitorConsentTestHelper) GetConfig() *config.Provider
func (*JanitorConsentTestHelper) GetConsentRequestLifespan ¶
func (j *JanitorConsentTestHelper) GetConsentRequestLifespan() time.Duration
func (*JanitorConsentTestHelper) GetDSN ¶
func (j *JanitorConsentTestHelper) GetDSN() string
func (*JanitorConsentTestHelper) GetNotAfterTestCycles ¶
func (j *JanitorConsentTestHelper) GetNotAfterTestCycles() map[string]time.Duration
func (*JanitorConsentTestHelper) GetRefreshTokenLifespan ¶
func (j *JanitorConsentTestHelper) GetRefreshTokenLifespan() time.Duration
func (*JanitorConsentTestHelper) GetRegistry ¶
func (*JanitorConsentTestHelper) GrantNotAfterSetup ¶
func (j *JanitorConsentTestHelper) GrantNotAfterSetup(ctx context.Context, cl client.Manager, gr trust.GrantManager) func(t *testing.T)
func (*JanitorConsentTestHelper) GrantNotAfterValidate ¶
func (j *JanitorConsentTestHelper) GrantNotAfterValidate(ctx context.Context, notAfter time.Time, gr trust.GrantManager) func(t *testing.T)
func (*JanitorConsentTestHelper) LimitSetup ¶
func (*JanitorConsentTestHelper) LimitValidate ¶
func (*JanitorConsentTestHelper) LoginConsentNotAfterSetup ¶
func (*JanitorConsentTestHelper) LoginConsentNotAfterValidate ¶
func (*JanitorConsentTestHelper) LoginRejectionSetup ¶
func (*JanitorConsentTestHelper) LoginRejectionValidate ¶
func (*JanitorConsentTestHelper) LoginTimeoutSetup ¶
func (*JanitorConsentTestHelper) LoginTimeoutValidate ¶
func (*JanitorConsentTestHelper) RefreshTokenNotAfterSetup ¶
func (j *JanitorConsentTestHelper) RefreshTokenNotAfterSetup(ctx context.Context, cl client.Manager, store x.FositeStorer) func(t *testing.T)
func (*JanitorConsentTestHelper) RefreshTokenNotAfterValidate ¶
func (j *JanitorConsentTestHelper) RefreshTokenNotAfterValidate(ctx context.Context, notAfter time.Time, store x.FositeStorer) func(t *testing.T)
Click to show internal directories.
Click to hide internal directories.