ory-am/hydra

View on GitHub
oauth2/revocator_test.go

Summary

Maintainability
A
3 hrs
Test Coverage

Function TestRevoke has 72 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func TestRevoke(t *testing.T) {
    conf := internal.NewConfigurationWithDefaults()
    reg := internal.NewRegistryMemory(t, conf, &contextx.Default{})

    internal.MustEnsureRegistryKeys(context.Background(), reg, x.OpenIDConnectKeyName)
Severity: Minor
Found in oauth2/revocator_test.go - About 1 hr to fix

    Function createAccessTokenSessionPairwise has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func createAccessTokenSessionPairwise(subject, client string, token string, expiresAt time.Time, fs x.FositeStorer, scopes fosite.Arguments, obfuscated string) {
    Severity: Minor
    Found in oauth2/revocator_test.go - About 45 mins to fix

      Function createAccessTokenSession has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func createAccessTokenSession(subject, client string, token string, expiresAt time.Time, fs x.FositeStorer, scopes fosite.Arguments) {
      Severity: Minor
      Found in oauth2/revocator_test.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status