ory-am/hydra

View on GitHub

Showing 402 of 849 total issues

Method OAuth2ApiService.AcceptOAuth2ConsentRequestExecute has 67 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (a *OAuth2ApiService) AcceptOAuth2ConsentRequestExecute(r ApiAcceptOAuth2ConsentRequestRequest) (*OAuth2RedirectTo, *http.Response, error) {
    var (
        localVarHTTPMethod  = http.MethodPut
        localVarPostBody    interface{}
        formFiles           []formFile
Severity: Minor
Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix

    Method OAuth2ApiService.RejectOAuth2LoginRequestExecute has 67 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (a *OAuth2ApiService) RejectOAuth2LoginRequestExecute(r ApiRejectOAuth2LoginRequestRequest) (*OAuth2RedirectTo, *http.Response, error) {
        var (
            localVarHTTPMethod  = http.MethodPut
            localVarPostBody    interface{}
            formFiles           []formFile
    Severity: Minor
    Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix

      Method JwkApiService.CreateJsonWebKeySetExecute has 67 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (a *JwkApiService) CreateJsonWebKeySetExecute(r ApiCreateJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) {
          var (
              localVarHTTPMethod  = http.MethodPost
              localVarPostBody    interface{}
              formFiles           []formFile
      Severity: Minor
      Found in internal/httpclient/api_jwk.go - About 1 hr to fix

        Function testRegistry has 67 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func testRegistry(t *testing.T, ctx context.Context, k string, t1 driver.Registry, t2 driver.Registry) {
            t.Run("package=client/manager="+k, func(t *testing.T) {
                t.Run("case=create-get-update-delete", client.TestHelperCreateGetUpdateDeleteClient(k, t1.Persister().Connection(context.Background()), t1.ClientManager(), t2.ClientManager()))
        
                t.Run("case=autogenerate-key", client.TestHelperClientAutoGenerateKey(k, t1.ClientManager()))
        Severity: Minor
        Found in persistence/sql/persister_test.go - About 1 hr to fix

          Method Handler.createVerifiableCredential has 18 return statements (exceeds 4 allowed).
          Open

          func (h *Handler) createVerifiableCredential(w http.ResponseWriter, r *http.Request) {
              ctx := r.Context()
              session := NewSessionWithCustomClaims(ctx, h.c, "")
              accessToken := fosite.AccessTokenFromRequest(r)
              tokenType, _, err := h.r.OAuth2Provider().IntrospectToken(ctx, accessToken, fosite.AccessToken, session)
          Severity: Major
          Found in oauth2/handler.go - About 1 hr to fix

            Method OAuth2ApiService.AcceptOAuth2LogoutRequestExecute has 66 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (a *OAuth2ApiService) AcceptOAuth2LogoutRequestExecute(r ApiAcceptOAuth2LogoutRequestRequest) (*OAuth2RedirectTo, *http.Response, error) {
                var (
                    localVarHTTPMethod  = http.MethodPut
                    localVarPostBody    interface{}
                    formFiles           []formFile
            Severity: Minor
            Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix

              Function TestValidateDynamicRegistration has 66 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func TestValidateDynamicRegistration(t *testing.T) {
                  ctx := context.Background()
                  c := internal.NewConfigurationWithDefaults()
                  c.MustSet(ctx, config.KeySubjectTypesSupported, []string{"pairwise", "public"})
                  c.MustSet(ctx, config.KeyDefaultClientScope, []string{"openid"})
              Severity: Minor
              Found in client/validator_test.go - About 1 hr to fix

                Method JwkApiService.SetJsonWebKeyExecute has 65 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func (a *JwkApiService) SetJsonWebKeyExecute(r ApiSetJsonWebKeyRequest) (*JsonWebKey, *http.Response, error) {
                    var (
                        localVarHTTPMethod  = http.MethodPut
                        localVarPostBody    interface{}
                        formFiles           []formFile
                Severity: Minor
                Found in internal/httpclient/api_jwk.go - About 1 hr to fix

                  Method Handler.oauth2TokenExchange has 65 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func (h *Handler) oauth2TokenExchange(w http.ResponseWriter, r *http.Request) {
                      ctx := r.Context()
                      session := NewSessionWithCustomClaims(ctx, h.c, "")
                  
                      accessRequest, err := h.r.OAuth2Provider().NewAccessRequest(ctx, r, session)
                  Severity: Minor
                  Found in oauth2/handler.go - About 1 hr to fix

                    Function TestAuthCodeWithMockStrategy has 17 return statements (exceeds 4 allowed).
                    Open

                    func TestAuthCodeWithMockStrategy(t *testing.T) {
                        ctx := context.Background()
                        for _, strat := range []struct{ d string }{{d: "opaque"}, {d: "jwt"}} {
                            t.Run("strategy="+strat.d, func(t *testing.T) {
                                conf := internal.NewConfigurationWithDefaults()
                    Severity: Major
                    Found in oauth2/oauth2_auth_code_test.go - About 1 hr to fix

                      Method OAuth2ApiService.SetOAuth2ClientLifespansExecute has 64 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func (a *OAuth2ApiService) SetOAuth2ClientLifespansExecute(r ApiSetOAuth2ClientLifespansRequest) (*OAuth2Client, *http.Response, error) {
                          var (
                              localVarHTTPMethod  = http.MethodPut
                              localVarPostBody    interface{}
                              formFiles           []formFile
                      Severity: Minor
                      Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix

                        Method JwkApiService.GetJsonWebKeyExecute has 64 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func (a *JwkApiService) GetJsonWebKeyExecute(r ApiGetJsonWebKeyRequest) (*JsonWebKeySet, *http.Response, error) {
                            var (
                                localVarHTTPMethod  = http.MethodGet
                                localVarPostBody    interface{}
                                formFiles           []formFile
                        Severity: Minor
                        Found in internal/httpclient/api_jwk.go - About 1 hr to fix

                          Method MetadataApiService.IsAliveExecute has 64 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func (a *MetadataApiService) IsAliveExecute(r ApiIsAliveRequest) (*HealthStatus, *http.Response, error) {
                              var (
                                  localVarHTTPMethod  = http.MethodGet
                                  localVarPostBody    interface{}
                                  formFiles           []formFile
                          Severity: Minor
                          Found in internal/httpclient/api_metadata.go - About 1 hr to fix

                            Method MetadataApiService.IsReadyExecute has 64 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

                            func (a *MetadataApiService) IsReadyExecute(r ApiIsReadyRequest) (*IsReady200Response, *http.Response, error) {
                                var (
                                    localVarHTTPMethod  = http.MethodGet
                                    localVarPostBody    interface{}
                                    formFiles           []formFile
                            Severity: Minor
                            Found in internal/httpclient/api_metadata.go - About 1 hr to fix

                              Method JwkApiService.SetJsonWebKeySetExecute has 64 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func (a *JwkApiService) SetJsonWebKeySetExecute(r ApiSetJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) {
                                  var (
                                      localVarHTTPMethod  = http.MethodPut
                                      localVarPostBody    interface{}
                                      formFiles           []formFile
                              Severity: Minor
                              Found in internal/httpclient/api_jwk.go - About 1 hr to fix

                                Function testHelperExpiryFields has 64 lines of code (exceeds 50 allowed). Consider refactoring.
                                Open

                                func testHelperExpiryFields(reg InternalRegistry) func(t *testing.T) {
                                    return func(t *testing.T) {
                                        m := reg.OAuth2Storage()
                                        t.Parallel()
                                
                                
                                Severity: Minor
                                Found in oauth2/fosite_store_helpers.go - About 1 hr to fix

                                  Function checkTokenResponse has 64 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

                                  func checkTokenResponse(token oauth2token) {
                                      if token.RefreshToken == "" {
                                          log.Fatalf("Expected a refresh token but none received: %+v", token)
                                      }
                                  
                                  
                                  Severity: Minor
                                  Found in test/mock-client/main.go - About 1 hr to fix

                                    Method OAuth2ApiService.RevokeOAuth2TokenExecute has 63 lines of code (exceeds 50 allowed). Consider refactoring.
                                    Open

                                    func (a *OAuth2ApiService) RevokeOAuth2TokenExecute(r ApiRevokeOAuth2TokenRequest) (*http.Response, error) {
                                        var (
                                            localVarHTTPMethod = http.MethodPost
                                            localVarPostBody   interface{}
                                            formFiles          []formFile
                                    Severity: Minor
                                    Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix

                                      Method OAuth2ApiService.TrustOAuth2JwtGrantIssuerExecute has 63 lines of code (exceeds 50 allowed). Consider refactoring.
                                      Open

                                      func (a *OAuth2ApiService) TrustOAuth2JwtGrantIssuerExecute(r ApiTrustOAuth2JwtGrantIssuerRequest) (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) {
                                          var (
                                              localVarHTTPMethod  = http.MethodPost
                                              localVarPostBody    interface{}
                                              formFiles           []formFile
                                      Severity: Minor
                                      Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix

                                        Method OAuth2ApiService.GetOAuth2ClientExecute has 63 lines of code (exceeds 50 allowed). Consider refactoring.
                                        Open

                                        func (a *OAuth2ApiService) GetOAuth2ClientExecute(r ApiGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) {
                                            var (
                                                localVarHTTPMethod  = http.MethodGet
                                                localVarPostBody    interface{}
                                                formFiles           []formFile
                                        Severity: Minor
                                        Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language