Preparing report...

Report for github.com/ory/fosite

A+    Excellent!    Found 86 issues across 185 files

Tweet

gofmt99%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo94%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • fosite/handler/rfc7523/handler.go
    • Line 239: warning: cyclomatic complexity 16 of function (*Handler).validateTokenClaims() is high (> 15) (gocyclo)
    • Line 61: warning: cyclomatic complexity 16 of function (*Handler).HandleTokenEndpointRequest() is high (> 15) (gocyclo)

golint54%

Golint is a linter for Go source code.

    • fosite/handler/oauth2/helper.go
    • Line 31: warning: exported type HandleHelper should have comment or be unexported (golint)
    • Line 38: warning: exported method HandleHelper.IssueAccessToken should have comment or be unexported (golint)
    • fosite/handler/oauth2/strategy.go
    • Line 30: warning: exported type CoreStrategy should have comment or be unexported (golint)
    • Line 36: warning: exported type AccessTokenStrategy should have comment or be unexported (golint)
    • Line 42: warning: exported type RefreshTokenStrategy should have comment or be unexported (golint)
    • Line 48: warning: exported type AuthorizeCodeStrategy should have comment or be unexported (golint)
    • fosite/handler/openid/flow_explicit_token.go
    • Line 34: warning: exported method OpenIDConnectExplicitHandler.HandleTokenEndpointRequest should have comment or be unexported (golint)
    • Line 38: warning: exported method OpenIDConnectExplicitHandler.PopulateTokenEndpointResponse should have comment or be unexported (golint)
    • Line 80: warning: exported method OpenIDConnectExplicitHandler.CanSkipClientAuth should have comment or be unexported (golint)
    • Line 84: warning: exported method OpenIDConnectExplicitHandler.CanHandleTokenEndpointRequest should have comment or be unexported (golint)
    • fosite/handler/openid/flow_refresh_token.go
    • Line 37: warning: exported type OpenIDConnectRefreshHandler should have comment or be unexported (golint)
    • Line 41: warning: exported method OpenIDConnectRefreshHandler.HandleTokenEndpointRequest should have comment or be unexported (golint)
    • Line 79: warning: exported method OpenIDConnectRefreshHandler.PopulateTokenEndpointResponse should have comment or be unexported (golint)
    • Line 115: warning: exported method OpenIDConnectRefreshHandler.CanSkipClientAuth should have comment or be unexported (golint)
    • Line 119: warning: exported method OpenIDConnectRefreshHandler.CanHandleTokenEndpointRequest should have comment or be unexported (golint)
    • fosite/audience_strategy.go
    • Line 11: warning: exported type AudienceMatchingStrategy should have comment or be unexported (golint)
    • Line 13: warning: exported function DefaultAudienceMatchingStrategy should have comment or be unexported (golint)
    • fosite/authorize_request.go
    • Line 28: warning: exported type ResponseModeType should have comment or be unexported (golint)
    • Line 31: warning: exported const ResponseModeDefault should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported function NewAuthorizeRequest should have comment or be unexported (golint)
    • Line 60: warning: exported method AuthorizeRequest.IsRedirectURIValid should have comment or be unexported (golint)
    • Line 77: warning: exported method AuthorizeRequest.GetResponseTypes should have comment or be unexported (golint)
    • Line 81: warning: exported method AuthorizeRequest.GetState should have comment or be unexported (golint)
    • Line 85: warning: exported method AuthorizeRequest.GetRedirectURI should have comment or be unexported (golint)
    • Line 89: warning: exported method AuthorizeRequest.SetResponseTypeHandled should have comment or be unexported (golint)
    • Line 93: warning: exported method AuthorizeRequest.DidHandleAllResponseTypes should have comment or be unexported (golint)
    • Line 103: warning: exported method AuthorizeRequest.GetResponseMode should have comment or be unexported (golint)
    • Line 107: warning: exported method AuthorizeRequest.SetDefaultResponseMode should have comment or be unexported (golint)
    • Line 114: warning: exported method AuthorizeRequest.GetDefaultResponseMode should have comment or be unexported (golint)
    • fosite/introspect.go
    • Line 34: warning: exported type TokenIntrospector should have comment or be unexported (golint)
    • Line 38: warning: exported function AccessTokenFromRequest should have comment or be unexported (golint)
    • Line 57: warning: exported method Fosite.IntrospectToken should have comment or be unexported (golint)
    • fosite/introspection_request_handler.go
    • Line 181: warning: exported type IntrospectionResponse should have comment or be unexported (golint)
    • Line 188: warning: exported method IntrospectionResponse.IsActive should have comment or be unexported (golint)
    • Line 192: warning: exported method IntrospectionResponse.GetAccessRequester should have comment or be unexported (golint)
    • Line 196: warning: exported method IntrospectionResponse.GetTokenUse should have comment or be unexported (golint)
    • Line 200: warning: exported method IntrospectionResponse.GetAccessTokenType should have comment or be unexported (golint)
    • fosite/internal/rw.go
    • Line 33: warning: comment on exported type MockResponseWriter should be of the form "MockResponseWriter ..." (with optional leading article) (golint)
    • Line 44: warning: exported function NewMockResponseWriter should have comment or be unexported (golint)
    • Line 50: warning: exported method MockResponseWriter.EXPECT should have comment or be unexported (golint)
    • Line 54: warning: exported method MockResponseWriter.Header should have comment or be unexported (golint)
    • Line 75: warning: exported method MockResponseWriter.WriteHeader should have comment or be unexported (golint)
    • fosite/token/jwt/jwt.go
    • Line 24: warning: package comment is detached; there should be no blank lines between it and the package statement (golint)
    • Line 41: warning: exported type JWTStrategy should have comment or be unexported (golint)
    • Line 50: warning: exported var SHA256HashSize should have comment or be unexported (golint)
    • fosite/response_handler.go
    • Line 30: warning: exported type ResponseModeTypes should have comment or be unexported (golint)
    • Line 32: warning: exported method ResponseModeTypes.Has should have comment or be unexported (golint)
    • Line 41: warning: exported type DefaultResponseModeHandler should have comment or be unexported (golint)
    • Line 43: warning: exported method DefaultResponseModeHandler.ResponseModes should have comment or be unexported (golint)
    • Line 44: warning: exported method DefaultResponseModeHandler.WriteAuthorizeResponse should have comment or be unexported (golint)
    • Line 46: warning: exported method DefaultResponseModeHandler.WriteAuthorizeError should have comment or be unexported (golint)
    • fosite/handler/openid/flow_explicit_auth.go
    • Line 32: warning: exported type OpenIDConnectExplicitHandler should have comment or be unexported (golint)
    • Line 48: warning: exported method OpenIDConnectExplicitHandler.HandleAuthorizeEndpointRequest should have comment or be unexported (golint)
    • fosite/hash_bcrypt.go
    • Line 32: warning: exported const DefaultBCryptWorkFactor should have comment or be unexported (golint)
    • Line 39: warning: exported method BCrypt.Hash should have comment or be unexported (golint)
    • Line 50: warning: exported method BCrypt.Compare should have comment or be unexported (golint)
    • fosite/handler/rfc7523/handler.go
    • Line 39: warning: exported type Handler should have comment or be unexported (golint)
    • Line 136: warning: exported method Handler.PopulateTokenEndpointResponse should have comment or be unexported (golint)
    • Line 144: warning: exported method Handler.CanSkipClientAuth should have comment or be unexported (golint)
    • Line 148: warning: exported method Handler.CanHandleTokenEndpointRequest should have comment or be unexported (golint)
    • Line 154: warning: exported method Handler.CheckRequest should have comment or be unexported (golint)
    • Line 328: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • fosite/handler/openid/storage.go
    • Line 30: warning: exported var ErrNoSessionFound should have comment or be unexported (golint)
    • Line 32: warning: exported type OpenIDConnectRequestStorage should have comment or be unexported (golint)
    • fosite/token/jwt/map_claims.go
    • Line 14: warning: exported var TimeFunc should have comment or be unexported (golint)
    • Line 23: warning: comment on exported method MapClaims.VerifyAudience should be of the form "VerifyAudience ..." (golint)
    • Line 46: warning: comment on exported method MapClaims.VerifyExpiresAt should be of the form "VerifyExpiresAt ..." (golint)
    • Line 55: warning: comment on exported method MapClaims.VerifyIssuedAt should be of the form "VerifyIssuedAt ..." (golint)
    • Line 64: warning: comment on exported method MapClaims.VerifyIssuer should be of the form "VerifyIssuer ..." (golint)
    • Line 71: warning: comment on exported method MapClaims.VerifyNotBefore should be of the form "VerifyNotBefore ..." (golint)
    • Line 102: warning: comment on exported method MapClaims.Valid should be of the form "Valid ..." (golint)
    • Line 132: warning: exported method MapClaims.UnmarshalJSON should have comment or be unexported (golint)
    • Line 181: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • fosite/internal/oauth2_refresh_storage.go
    • Line 35: warning: comment on exported type MockRefreshTokenGrantStorage should be of the form "MockRefreshTokenGrantStorage ..." (with optional leading article) (golint)
    • Line 46: warning: exported function NewMockRefreshTokenGrantStorage should have comment or be unexported (golint)
    • Line 52: warning: exported method MockRefreshTokenGrantStorage.EXPECT should have comment or be unexported (golint)
    • Line 56: warning: exported method MockRefreshTokenGrantStorage.CreateRefreshTokenSession should have comment or be unexported (golint)
    • Line 66: warning: exported method MockRefreshTokenGrantStorage.DeleteRefreshTokenSession should have comment or be unexported (golint)
    • Line 76: warning: exported method MockRefreshTokenGrantStorage.GetRefreshTokenSession should have comment or be unexported (golint)
    • Line 87: warning: exported method MockRefreshTokenGrantStorage.PersistRefreshTokenGrantSession should have comment or be unexported (golint)
    • fosite/integration/clients/jwt_bearer.go
    • Line 40: warning: exported type JWTBearer should have comment or be unexported (golint)
    • Line 48: warning: exported type Token should have comment or be unexported (golint)
    • Line 55: warning: exported type Header should have comment or be unexported (golint)
    • Line 61: warning: exported type JWTBearerPayload should have comment or be unexported (golint)
    • Line 67: warning: exported method JWTBearer.SetPrivateKey should have comment or be unexported (golint)
    • Line 86: warning: exported method JWTBearer.GetToken should have comment or be unexported (golint)
    • Line 148: warning: exported function NewJWTBearer should have comment or be unexported (golint)
    • fosite/handler/oauth2/flow_client_credentials.go
    • Line 33: warning: exported type ClientCredentialsGrantHandler should have comment or be unexported (golint)
    • Line 39: warning: comment on exported method ClientCredentialsGrantHandler.HandleTokenEndpointRequest should be of the form "HandleTokenEndpointRequest ..." (golint)
    • Line 81: warning: exported method ClientCredentialsGrantHandler.CanSkipClientAuth should have comment or be unexported (golint)
    • Line 85: warning: exported method ClientCredentialsGrantHandler.CanHandleTokenEndpointRequest should have comment or be unexported (golint)
    • fosite/handler/oauth2/flow_resource_owner.go
    • Line 35: warning: exported type ResourceOwnerPasswordCredentialsGrantHandler should have comment or be unexported (golint)
    • Line 117: warning: exported method ResourceOwnerPasswordCredentialsGrantHandler.CanSkipClientAuth should have comment or be unexported (golint)
    • Line 121: warning: exported method ResourceOwnerPasswordCredentialsGrantHandler.CanHandleTokenEndpointRequest should have comment or be unexported (golint)
    • fosite/handler/openid/flow_hybrid.go
    • Line 36: warning: exported type OpenIDConnectHybridHandler should have comment or be unexported (golint)
    • Line 49: warning: exported method OpenIDConnectHybridHandler.HandleAuthorizeEndpointRequest should have comment or be unexported (golint)
    • fosite/handler/oauth2/flow_refresh.go
    • Line 38: warning: exported type RefreshTokenGrantHandler should have comment or be unexported (golint)
    • Line 238: warning: exported method RefreshTokenGrantHandler.CanSkipClientAuth should have comment or be unexported (golint)
    • Line 242: warning: exported method RefreshTokenGrantHandler.CanHandleTokenEndpointRequest should have comment or be unexported (golint)
    • fosite/access_response.go
    • Line 29: warning: exported function NewAccessResponse should have comment or be unexported (golint)
    • Line 35: warning: exported type AccessResponse should have comment or be unexported (golint)
    • Line 41: warning: exported method AccessResponse.SetScopes should have comment or be unexported (golint)
    • Line 45: warning: exported method AccessResponse.SetExpiresIn should have comment or be unexported (golint)
    • Line 49: warning: exported method AccessResponse.SetExtra should have comment or be unexported (golint)
    • Line 53: warning: exported method AccessResponse.GetExtra should have comment or be unexported (golint)
    • Line 57: warning: exported method AccessResponse.SetAccessToken should have comment or be unexported (golint)
    • Line 61: warning: exported method AccessResponse.SetTokenType should have comment or be unexported (golint)
    • Line 65: warning: exported method AccessResponse.GetAccessToken should have comment or be unexported (golint)
    • Line 69: warning: exported method AccessResponse.GetTokenType should have comment or be unexported (golint)
    • Line 73: warning: exported method AccessResponse.ToMap should have comment or be unexported (golint)
    • fosite/arguments.go
    • Line 26: warning: exported type Arguments should have comment or be unexported (golint)
    • Line 73: warning: comment on exported method Arguments.Exact should be of the form "Exact ..." (golint)
    • fosite/authorize_response.go
    • Line 36: warning: exported function NewAuthorizeResponse should have comment or be unexported (golint)
    • Line 43: warning: exported method AuthorizeResponse.GetCode should have comment or be unexported (golint)
    • Line 47: warning: exported method AuthorizeResponse.GetHeader should have comment or be unexported (golint)
    • Line 51: warning: exported method AuthorizeResponse.AddHeader should have comment or be unexported (golint)
    • Line 55: warning: exported method AuthorizeResponse.GetParameters should have comment or be unexported (golint)
    • Line 59: warning: exported method AuthorizeResponse.AddParameter should have comment or be unexported (golint)
    • fosite/storage/transactional.go
    • Line 5: warning: comment on exported type Transactional should be of the form "Transactional ..." (with optional leading article) (golint)
    • Line 30: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 41: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • fosite/context.go
    • Line 26: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 30: warning: exported type ContextKey should have comment or be unexported (golint)
    • Line 33: warning: exported const RequestContextKey should have comment (or a comment on this block) or be unexported (golint)
    • fosite/scope_strategy.go
    • Line 29: warning: exported function HierarchicScopeStrategy should have comment or be unexported (golint)
    • Line 59: warning: exported function ExactScopeStrategy should have comment or be unexported (golint)
    • Line 69: warning: exported function WildcardScopeStrategy should have comment or be unexported (golint)
    • fosite/session.go
    • Line 61: warning: exported method DefaultSession.SetExpiresAt should have comment or be unexported (golint)
    • Line 68: warning: exported method DefaultSession.GetExpiresAt should have comment or be unexported (golint)
    • Line 79: warning: exported method DefaultSession.GetUsername should have comment or be unexported (golint)
    • Line 86: warning: exported method DefaultSession.SetSubject should have comment or be unexported (golint)
    • Line 90: warning: exported method DefaultSession.GetSubject should have comment or be unexported (golint)
    • Line 98: warning: exported method DefaultSession.Clone should have comment or be unexported (golint)
    • fosite/compose/compose_strategy.go
    • Line 34: warning: exported type CommonStrategy should have comment or be unexported (golint)
    • Line 40: warning: exported function NewOAuth2HMACStrategy should have comment or be unexported (golint)
    • Line 53: warning: exported function NewOAuth2JWTStrategy should have comment or be unexported (golint)
    • Line 62: warning: exported function NewOAuth2JWTECDSAStrategy should have comment or be unexported (golint)
    • Line 71: warning: comment on exported function NewOAuth2JWTStrategyWithIssuer should be of the form "NewOAuth2JWTStrategyWithIssuer ..." (golint)
    • Line 76: warning: comment on exported function NewOAuth2JWTECDSAStrategyWithIssuer should be of the form "NewOAuth2JWTECDSAStrategyWithIssuer ..." (golint)
    • Line 81: warning: exported function NewOpenIDConnectStrategy should have comment or be unexported (golint)
    • Line 92: warning: exported function NewOpenIDConnectECDSAStrategy should have comment or be unexported (golint)
    • fosite/token/jwt/token.go
    • Line 28: warning: exported const SigningMethodNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: comment on exported const UnsafeAllowNoneSignatureType should be of the form "UnsafeAllowNoneSignatureType ..." (golint)
    • Line 145: warning: comment on exported type Keyfunc should be of the form "Keyfunc ..." (with optional leading article) (golint)
    • Line 151: warning: exported function Parse should have comment or be unexported (golint)
    • Line 155: warning: comment on exported function ParseWithClaims should be of the form "ParseWithClaims ..." (golint)
    • fosite/handler/oauth2/flow_authorize_code_token.go
    • Line 133: warning: exported method AuthorizeExplicitGrantHandler.PopulateTokenEndpointResponse should have comment or be unexported (golint)
    • Line 208: warning: exported method AuthorizeExplicitGrantHandler.CanSkipClientAuth should have comment or be unexported (golint)
    • Line 212: warning: exported method AuthorizeExplicitGrantHandler.CanHandleTokenEndpointRequest should have comment or be unexported (golint)
    • fosite/client.go
    • Line 109: warning: exported type DefaultOpenIDConnectClient should have comment or be unexported (golint)
    • Line 119: warning: exported type DefaultResponseModeClient should have comment or be unexported (golint)
    • Line 124: warning: exported method DefaultClient.GetID should have comment or be unexported (golint)
    • Line 128: warning: exported method DefaultClient.IsPublic should have comment or be unexported (golint)
    • Line 132: warning: exported method DefaultClient.GetAudience should have comment or be unexported (golint)
    • Line 136: warning: exported method DefaultClient.GetRedirectURIs should have comment or be unexported (golint)
    • Line 140: warning: exported method DefaultClient.GetHashedSecret should have comment or be unexported (golint)
    • Line 144: warning: exported method DefaultClient.GetRotatedHashes should have comment or be unexported (golint)
    • Line 148: warning: exported method DefaultClient.GetScopes should have comment or be unexported (golint)
    • Line 152: warning: exported method DefaultClient.GetGrantTypes should have comment or be unexported (golint)
    • Line 164: warning: exported method DefaultClient.GetResponseTypes should have comment or be unexported (golint)
    • Line 176: warning: exported method DefaultOpenIDConnectClient.GetJSONWebKeysURI should have comment or be unexported (golint)
    • Line 180: warning: exported method DefaultOpenIDConnectClient.GetJSONWebKeys should have comment or be unexported (golint)
    • Line 184: warning: exported method DefaultOpenIDConnectClient.GetTokenEndpointAuthSigningAlgorithm should have comment or be unexported (golint)
    • Line 187: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 192: warning: exported method DefaultOpenIDConnectClient.GetRequestObjectSigningAlgorithm should have comment or be unexported (golint)
    • Line 196: warning: exported method DefaultOpenIDConnectClient.GetTokenEndpointAuthMethod should have comment or be unexported (golint)
    • Line 200: warning: exported method DefaultOpenIDConnectClient.GetRequestURIs should have comment or be unexported (golint)
    • Line 204: warning: exported method DefaultResponseModeClient.GetResponseModes should have comment or be unexported (golint)
    • fosite/token/hmac/hmacsha.go
    • Line 24: warning: package comment is detached; there should be no blank lines between it and the package statement (golint)
    • Line 162: warning: exported method HMACStrategy.Signature should have comment or be unexported (golint)
    • fosite/handler/openid/validator.go
    • Line 40: warning: exported type OpenIDConnectRequestValidator should have comment or be unexported (golint)
    • Line 46: warning: exported function NewOpenIDConnectRequestValidator should have comment or be unexported (golint)
    • Line 57: warning: exported method OpenIDConnectRequestValidator.WithRedirectSecureChecker should have comment or be unexported (golint)
    • Line 69: warning: exported method OpenIDConnectRequestValidator.ValidatePrompt should have comment or be unexported (golint)
    • fosite/handler/oauth2/strategy_jwt.go
    • Line 45: warning: exported method DefaultJWTStrategy.WithIssuer should have comment or be unexported (golint)
    • Line 50: warning: exported method DefaultJWTStrategy.WithScopeField should have comment or be unexported (golint)
    • Line 64: warning: exported method DefaultJWTStrategy.AccessTokenSignature should have comment or be unexported (golint)
    • Line 68: warning: exported method DefaultJWTStrategy.GenerateAccessToken should have comment or be unexported (golint)
    • Line 72: warning: exported method DefaultJWTStrategy.ValidateAccessToken should have comment or be unexported (golint)
    • Line 77: warning: exported method DefaultJWTStrategy.RefreshTokenSignature should have comment or be unexported (golint)
    • Line 81: warning: exported method DefaultJWTStrategy.AuthorizeCodeSignature should have comment or be unexported (golint)
    • Line 85: warning: exported method DefaultJWTStrategy.GenerateRefreshToken should have comment or be unexported (golint)
    • Line 89: warning: exported method DefaultJWTStrategy.ValidateRefreshToken should have comment or be unexported (golint)
    • Line 93: warning: exported method DefaultJWTStrategy.GenerateAuthorizeCode should have comment or be unexported (golint)
    • Line 97: warning: exported method DefaultJWTStrategy.ValidateAuthorizeCode should have comment or be unexported (golint)
    • fosite/handler.go
    • Line 28: warning: exported type AuthorizeEndpointHandler should have comment or be unexported (golint)
    • Line 43: warning: exported type TokenEndpointHandler should have comment or be unexported (golint)
    • fosite/request.go
    • Line 44: warning: exported function NewRequest should have comment or be unexported (golint)
    • Line 56: warning: exported method Request.GetID should have comment or be unexported (golint)
    • Line 63: warning: exported method Request.SetID should have comment or be unexported (golint)
    • Line 67: warning: exported method Request.GetRequestForm should have comment or be unexported (golint)
    • Line 71: warning: exported method Request.GetRequestedAt should have comment or be unexported (golint)
    • Line 75: warning: exported method Request.GetClient should have comment or be unexported (golint)
    • Line 79: warning: exported method Request.GetRequestedScopes should have comment or be unexported (golint)
    • Line 83: warning: exported method Request.SetRequestedScopes should have comment or be unexported (golint)
    • Line 90: warning: exported method Request.SetRequestedAudience should have comment or be unexported (golint)
    • Line 97: warning: exported method Request.AppendRequestedScope should have comment or be unexported (golint)
    • Line 106: warning: exported method Request.AppendRequestedAudience should have comment or be unexported (golint)
    • Line 115: warning: exported method Request.GetRequestedAudience should have comment or be unexported (golint)
    • Line 119: warning: exported method Request.GrantAudience should have comment or be unexported (golint)
    • Line 128: warning: exported method Request.GetGrantedScopes should have comment or be unexported (golint)
    • Line 132: warning: exported method Request.GetGrantedAudience should have comment or be unexported (golint)
    • Line 136: warning: exported method Request.GrantScope should have comment or be unexported (golint)
    • Line 145: warning: exported method Request.SetSession should have comment or be unexported (golint)
    • Line 149: warning: exported method Request.GetSession should have comment or be unexported (golint)
    • Line 153: warning: exported method Request.Merge should have comment or be unexported (golint)
    • Line 178: warning: exported method Request.Sanitize should have comment or be unexported (golint)
    • fosite/compose/config.go
    • Line 31: warning: exported type Config should have comment or be unexported (golint)
    • Line 146: warning: comment on exported method Config.GetIDTokenLifespan should be of the form "GetIDTokenLifespan ..." (golint)
    • Line 215: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • fosite/internal/key.go
    • Line 31: warning: exported function MustRSAKey should have comment or be unexported (golint)
    • Line 40: warning: exported function MustECDSAKey should have comment or be unexported (golint)
    • fosite/handler/oauth2/flow_authorize_code_auth.go
    • Line 35: warning: comment on exported type AuthorizeExplicitGrantHandler should be of the form "AuthorizeExplicitGrantHandler ..." (with optional leading article) (golint)
    • Line 78: warning: exported method AuthorizeExplicitGrantHandler.HandleAuthorizeEndpointRequest should have comment or be unexported (golint)
    • Line 109: warning: exported method AuthorizeExplicitGrantHandler.IssueAuthorizeCode should have comment or be unexported (golint)
    • Line 130: warning: exported method AuthorizeExplicitGrantHandler.GetSanitationWhiteList should have comment or be unexported (golint)
    • fosite/storage/memory.go
    • Line 34: warning: exported type MemoryUserRelation should have comment or be unexported (golint)
    • Line 39: warning: exported type IssuerPublicKeys should have comment or be unexported (golint)
    • Line 44: warning: exported type SubjectPublicKeys should have comment or be unexported (golint)
    • Line 49: warning: exported type PublicKeyScopes should have comment or be unexported (golint)
    • Line 54: warning: exported type MemoryStore should have comment or be unexported (golint)
    • Line 82: warning: exported function NewMemoryStore should have comment or be unexported (golint)
    • Line 98: warning: exported type StoreAuthorizeCode should have comment or be unexported (golint)
    • Line 103: warning: exported type StoreRefreshToken should have comment or be unexported (golint)
    • Line 108: warning: exported function NewExampleStore should have comment or be unexported (golint)
    • Line 149: warning: exported method MemoryStore.CreateOpenIDConnectSession should have comment or be unexported (golint)
    • Line 157: warning: exported method MemoryStore.GetOpenIDConnectSession should have comment or be unexported (golint)
    • Line 168: warning: exported method MemoryStore.DeleteOpenIDConnectSession should have comment or be unexported (golint)
    • Line 176: warning: exported method MemoryStore.GetClient should have comment or be unexported (golint)
    • Line 187: warning: exported method MemoryStore.ClientAssertionJWTValid should have comment or be unexported (golint)
    • Line 198: warning: exported method MemoryStore.SetClientAssertionJWT should have comment or be unexported (golint)
    • Line 217: warning: exported method MemoryStore.CreateAuthorizeCodeSession should have comment or be unexported (golint)
    • Line 225: warning: exported method MemoryStore.GetAuthorizeCodeSession should have comment or be unexported (golint)
    • Line 240: warning: exported method MemoryStore.InvalidateAuthorizeCodeSession should have comment or be unexported (golint)
    • Line 253: warning: exported method MemoryStore.CreatePKCERequestSession should have comment or be unexported (golint)
    • Line 261: warning: exported method MemoryStore.GetPKCERequestSession should have comment or be unexported (golint)
    • Line 272: warning: exported method MemoryStore.DeletePKCERequestSession should have comment or be unexported (golint)
    • Line 280: warning: exported method MemoryStore.CreateAccessTokenSession should have comment or be unexported (golint)
    • Line 293: warning: exported method MemoryStore.GetAccessTokenSession should have comment or be unexported (golint)
    • Line 304: warning: exported method MemoryStore.DeleteAccessTokenSession should have comment or be unexported (golint)
    • Line 312: warning: exported method MemoryStore.CreateRefreshTokenSession should have comment or be unexported (golint)
    • Line 325: warning: exported method MemoryStore.GetRefreshTokenSession should have comment or be unexported (golint)
    • Line 339: warning: exported method MemoryStore.DeleteRefreshTokenSession should have comment or be unexported (golint)
    • Line 347: warning: exported method MemoryStore.Authenticate should have comment or be unexported (golint)
    • Line 361: warning: exported method MemoryStore.RevokeRefreshToken should have comment or be unexported (golint)
    • Line 376: warning: exported method MemoryStore.RevokeAccessToken should have comment or be unexported (golint)
    • Line 388: warning: exported method MemoryStore.GetPublicKey should have comment or be unexported (golint)
    • Line 402: warning: exported method MemoryStore.GetPublicKeys should have comment or be unexported (golint)
    • Line 424: warning: exported method MemoryStore.GetPublicKeyScopes should have comment or be unexported (golint)
    • Line 439: warning: exported method MemoryStore.IsJWTUsed should have comment or be unexported (golint)
    • Line 448: warning: exported method MemoryStore.MarkJWTUsedForTime should have comment or be unexported (golint)
    • fosite/handler/openid/strategy_jwt.go
    • Line 41: warning: exported type Session should have comment or be unexported (golint)
    • Line 52: warning: comment on exported type DefaultSession should be of the form "DefaultSession ..." (with optional leading article) (golint)
    • Line 61: warning: exported function NewDefaultSession should have comment or be unexported (golint)
    • Line 70: warning: exported method DefaultSession.Clone should have comment or be unexported (golint)
    • Line 78: warning: exported method DefaultSession.SetExpiresAt should have comment or be unexported (golint)
    • Line 85: warning: exported method DefaultSession.GetExpiresAt should have comment or be unexported (golint)
    • Line 96: warning: exported method DefaultSession.GetUsername should have comment or be unexported (golint)
    • Line 103: warning: exported method DefaultSession.SetSubject should have comment or be unexported (golint)
    • Line 107: warning: exported method DefaultSession.GetSubject should have comment or be unexported (golint)
    • Line 115: warning: exported method DefaultSession.IDTokenHeaders should have comment or be unexported (golint)
    • Line 122: warning: exported method DefaultSession.IDTokenClaims should have comment or be unexported (golint)
    • Line 129: warning: exported type DefaultStrategy should have comment or be unexported (golint)
    • Line 138: warning: exported method DefaultStrategy.GenerateIDToken should have comment or be unexported (golint)
    • fosite/handler/oauth2/strategy_jwt_session.go
    • Line 33: warning: exported type JWTSessionContainer should have comment or be unexported (golint)
    • Line 52: warning: exported method JWTSession.GetJWTClaims should have comment or be unexported (golint)
    • Line 59: warning: exported method JWTSession.GetJWTHeader should have comment or be unexported (golint)
    • Line 66: warning: exported method JWTSession.SetExpiresAt should have comment or be unexported (golint)
    • Line 73: warning: exported method JWTSession.GetExpiresAt should have comment or be unexported (golint)
    • Line 84: warning: exported method JWTSession.GetUsername should have comment or be unexported (golint)
    • Line 91: warning: exported method JWTSession.SetSubject should have comment or be unexported (golint)
    • Line 95: warning: exported method JWTSession.GetSubject should have comment or be unexported (golint)
    • Line 103: warning: exported method JWTSession.Clone should have comment or be unexported (golint)
    • Line 113: warning: receiver name s should be consistent with previous receiver name j for JWTSession (golint)
    • fosite/handler/pkce/handler.go
    • Line 38: warning: exported type Handler should have comment or be unexported (golint)
    • Line 54: warning: exported method Handler.HandleAuthorizeEndpointRequest should have comment or be unexported (golint)
    • Line 129: warning: exported method Handler.HandleTokenEndpointRequest should have comment or be unexported (golint)
    • Line 229: warning: exported method Handler.PopulateTokenEndpointResponse should have comment or be unexported (golint)
    • Line 233: warning: exported method Handler.CanSkipClientAuth should have comment or be unexported (golint)
    • Line 237: warning: exported method Handler.CanHandleTokenEndpointRequest should have comment or be unexported (golint)
    • fosite/handler/openid/helper.go
    • Line 33: warning: exported type IDTokenHandleHelper should have comment or be unexported (golint)
    • Line 37: warning: exported method IDTokenHandleHelper.GetAccessTokenHash should have comment or be unexported (golint)
    • Line 61: warning: exported method IDTokenHandleHelper.IssueImplicitIDToken should have comment or be unexported (golint)
    • Line 70: warning: exported method IDTokenHandleHelper.IssueExplicitIDToken should have comment or be unexported (golint)
    • fosite/access_request.go
    • Line 24: warning: exported type AccessRequest should have comment or be unexported (golint)
    • Line 31: warning: exported function NewAccessRequest should have comment or be unexported (golint)
    • Line 41: warning: exported method AccessRequest.GetGrantTypes should have comment or be unexported (golint)
    • fosite/handler/oauth2/storage.go
    • Line 30: warning: exported type CoreStorage should have comment or be unexported (golint)
    • Line 54: warning: exported type AccessTokenStorage should have comment or be unexported (golint)
    • Line 62: warning: exported type RefreshTokenStorage should have comment or be unexported (golint)
    • fosite/handler/oauth2/strategy_hmacsha.go
    • Line 34: warning: exported type HMACSHAStrategy should have comment or be unexported (golint)
    • Line 41: warning: exported method HMACSHAStrategy.AccessTokenSignature should have comment or be unexported (golint)
    • Line 44: warning: exported method HMACSHAStrategy.RefreshTokenSignature should have comment or be unexported (golint)
    • Line 47: warning: exported method HMACSHAStrategy.AuthorizeCodeSignature should have comment or be unexported (golint)
    • Line 51: warning: exported method HMACSHAStrategy.GenerateAccessToken should have comment or be unexported (golint)
    • Line 55: warning: exported method HMACSHAStrategy.ValidateAccessToken should have comment or be unexported (golint)
    • Line 66: warning: exported method HMACSHAStrategy.GenerateRefreshToken should have comment or be unexported (golint)
    • Line 70: warning: exported method HMACSHAStrategy.ValidateRefreshToken should have comment or be unexported (golint)
    • Line 82: warning: exported method HMACSHAStrategy.GenerateAuthorizeCode should have comment or be unexported (golint)
    • Line 86: warning: exported method HMACSHAStrategy.ValidateAuthorizeCode should have comment or be unexported (golint)
    • fosite/errors.go
    • Line 45: warning: exported var ErrUnknownRequest should have comment or be unexported (golint)
    • Line 261: warning: exported type RFC6749Error should have comment or be unexported (golint)
    • Line 285: warning: exported function ErrorToRFC6749Error should have comment or be unexported (golint)
    • Line 316: warning: exported method RFC6749Error.Wrap should have comment or be unexported (golint)
    • Line 320: warning: exported method RFC6749Error.WithWrap should have comment or be unexported (golint)
    • Line 325: warning: exported method RFC6749Error.WithLegacyFormat should have comment or be unexported (golint)
    • Line 330: warning: exported method RFC6749Error.WithTrace should have comment or be unexported (golint)
    • Line 339: warning: exported method RFC6749Error.Is should have comment or be unexported (golint)
    • Line 351: warning: exported method RFC6749Error.Status should have comment or be unexported (golint)
    • Line 359: warning: exported method RFC6749Error.RequestID should have comment or be unexported (golint)
    • Line 363: warning: exported method RFC6749Error.Reason should have comment or be unexported (golint)
    • Line 367: warning: exported method RFC6749Error.StatusCode should have comment or be unexported (golint)
    • Line 371: warning: exported method RFC6749Error.Cause should have comment or be unexported (golint)
    • Line 375: warning: exported method RFC6749Error.WithHintf should have comment or be unexported (golint)
    • Line 379: warning: exported method RFC6749Error.WithHint should have comment or be unexported (golint)
    • Line 385: warning: exported method RFC6749Error.Debug should have comment or be unexported (golint)
    • Line 389: warning: exported method RFC6749Error.WithDebug should have comment or be unexported (golint)
    • Line 395: warning: exported method RFC6749Error.WithDebugf should have comment or be unexported (golint)
    • Line 399: warning: exported method RFC6749Error.WithDescription should have comment or be unexported (golint)
    • Line 442: warning: exported method RFC6749Error.UnmarshalJSON should have comment or be unexported (golint)
    • Line 462: warning: exported method RFC6749Error.MarshalJSON should have comment or be unexported (golint)
    • Line 484: warning: exported method RFC6749Error.ToValues should have comment or be unexported (golint)
    • fosite/oauth2.go
    • Line 31: warning: exported type TokenUse should have comment or be unexported (golint)
    • Line 33: warning: exported type TokenType should have comment or be unexported (golint)
    • Line 36: warning: exported const AccessToken should have comment (or a comment on this block) or be unexported (golint)
    • fosite/handler/openid/flow_implicit.go
    • Line 35: warning: exported type OpenIDConnectImplicitHandler should have comment or be unexported (golint)
    • Line 46: warning: exported method OpenIDConnectImplicitHandler.HandleAuthorizeEndpointRequest should have comment or be unexported (golint)
    • fosite/internal/oauth2_explicit_storage.go
    • Line 35: warning: comment on exported type MockAuthorizeCodeGrantStorage should be of the form "MockAuthorizeCodeGrantStorage ..." (with optional leading article) (golint)
    • Line 46: warning: exported function NewMockAuthorizeCodeGrantStorage should have comment or be unexported (golint)
    • Line 52: warning: exported method MockAuthorizeCodeGrantStorage.EXPECT should have comment or be unexported (golint)
    • Line 56: warning: exported method MockAuthorizeCodeGrantStorage.CreateAuthorizeCodeSession should have comment or be unexported (golint)
    • Line 66: warning: exported method MockAuthorizeCodeGrantStorage.DeleteAuthorizeCodeSession should have comment or be unexported (golint)
    • Line 76: warning: exported method MockAuthorizeCodeGrantStorage.GetAuthorizeCodeSession should have comment or be unexported (golint)
    • Line 87: warning: exported method MockAuthorizeCodeGrantStorage.PersistAuthorizeCodeGrantSession should have comment or be unexported (golint)
    • fosite/token/jwt/claims_jwt.go
    • Line 31: warning: comment on exported type JWTScopeFieldEnum should be of the form "JWTScopeFieldEnum ..." (with optional leading article) (golint)
    • Line 35: warning: exported const JWTScopeFieldUnset should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported type JWTClaimsDefaults should have comment or be unexported (golint)
    • Line 48: warning: exported type JWTClaimsContainer should have comment or be unexported (golint)
    • Line 77: warning: exported method JWTClaims.With should have comment or be unexported (golint)
    • Line 84: warning: exported method JWTClaims.WithDefaults should have comment or be unexported (golint)
    • Line 95: warning: exported method JWTClaims.WithScopeField should have comment or be unexported (golint)
    • fosite/handler/oauth2/flow_authorize_implicit.go
    • Line 50: warning: exported method AuthorizeImplicitGrantTypeHandler.HandleAuthorizeEndpointRequest should have comment or be unexported (golint)
    • Line 84: warning: exported method AuthorizeImplicitGrantTypeHandler.IssueImplicitAccessToken should have comment or be unexported (golint)
    • fosite/client_authentication_jwks_strategy.go
    • Line 43: warning: exported type DefaultJWKSFetcherStrategy should have comment or be unexported (golint)
    • Line 49: warning: exported function NewDefaultJWKSFetcherStrategy should have comment or be unexported (golint)
    • Line 56: warning: exported method DefaultJWKSFetcherStrategy.Resolve should have comment or be unexported (golint)
    • fosite/authorize_helper.go
    • Line 37: warning: exported var FormPostDefaultTemplate should have comment or be unexported (golint)
    • Line 189: warning: exported function IsRedirectURISecure should have comment or be unexported (golint)
    • Line 200: warning: exported function IsLocalhost should have comment or be unexported (golint)
    • Line 205: warning: exported function WriteAuthorizeFormPostResponse should have comment or be unexported (golint)
    • Line 215: warning: exported function URLSetFragment should have comment or be unexported (golint)
    • Line 229: warning: exported function GetPostFormHTMLTemplate should have comment or be unexported (golint)
    • fosite/client_authentication.go
    • Line 104: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 306: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • fosite/fosite.go
    • Line 120: warning: exported const MinParameterEntropy should have comment or be unexported (golint)
    • Line 126: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 133: warning: exported method Fosite.ResponseModeHandler should have comment or be unexported (golint)
    • fosite/integration/clients/introspect.go
    • Line 33: warning: exported type IntrospectForm should have comment or be unexported (golint)
    • Line 38: warning: exported type IntrospectResponse should have comment or be unexported (golint)
    • Line 49: warning: exported type Introspect should have comment or be unexported (golint)
    • Line 54: warning: exported method Introspect.IntrospectToken should have comment or be unexported (golint)
    • Line 115: warning: exported function NewIntrospectClient should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words