ory-am/hydra

View on GitHub

Showing 412 of 865 total issues

Method JwkAPIService.DeleteJsonWebKeyExecute has 55 lines of code (exceeds 50 allowed). Consider refactoring.
Open

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

    Method DefaultStrategy.verifyConsent has 12 return statements (exceeds 4 allowed).
    Open

    func (s *DefaultStrategy) verifyConsent(ctx context.Context, _ http.ResponseWriter, r *http.Request, verifier string) (_ *flow.AcceptOAuth2ConsentRequest, _ *flow.Flow, err error) {
        ctx, span := trace.SpanFromContext(ctx).TracerProvider().Tracer("").Start(ctx, "DefaultStrategy.verifyConsent")
        defer otelx.End(span, &err)
    
        // We decode the flow here once again because VerifyAndInvalidateConsentRequest does not return the flow
    Severity: Major
    Found in consent/strategy_default.go - About 1 hr to fix

      Function TestJWTBearer has 12 return statements (exceeds 4 allowed).
      Open

      func TestJWTBearer(t *testing.T) {
          ctx := context.Background()
          reg := internal.NewMockedRegistry(t, &contextx.Default{})
          reg.Config().MustSet(ctx, config.KeyAccessTokenStrategy, "opaque")
          _, admin := testhelpers.NewOAuth2Server(ctx, t, reg)
      Severity: Major
      Found in oauth2/oauth2_jwt_bearer_test.go - About 1 hr to fix

        Method OAuth2APIService.DeleteTrustedOAuth2JwtGrantIssuerExecute has 54 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

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

          Method OAuth2APIService.DeleteOAuth2ClientExecute has 54 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

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

            Method OidcAPIService.DeleteOidcDynamicClientExecute has 54 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (a *OidcAPIService) DeleteOidcDynamicClientExecute(r ApiDeleteOidcDynamicClientRequest) (*http.Response, error) {
                var (
                    localVarHTTPMethod = http.MethodDelete
                    localVarPostBody   interface{}
                    formFiles          []formFile
            Severity: Minor
            Found in internal/httpclient/api_oidc.go - About 1 hr to fix

              Method MetadataAPIService.GetVersionExecute has 54 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func (a *MetadataAPIService) GetVersionExecute(r ApiGetVersionRequest) (*GetVersion200Response, *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.DeleteJsonWebKeySetExecute has 54 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

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

                  Function NewCreateClientsCommand has 54 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func NewCreateClientsCommand() *cobra.Command {
                      cmd := &cobra.Command{
                          Use:     "oauth2-client",
                          Short:   "Create an OAuth 2.0 Client",
                          Aliases: []string{"client"},
                  Severity: Minor
                  Found in cmd/cmd_create_client.go - About 1 hr to fix

                    Function NewOidcConfiguration has 9 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    func NewOidcConfiguration(authorizationEndpoint string, idTokenSignedResponseAlg []string, idTokenSigningAlgValuesSupported []string, issuer string, jwksUri string, responseTypesSupported []string, subjectTypesSupported []string, tokenEndpoint string, userinfoSignedResponseAlg []string) *OidcConfiguration {
                    Severity: Major
                    Found in internal/httpclient/model_oidc_configuration.go - About 1 hr to fix

                      Function initTestKeyPairs has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const initTestKeyPairs = async () => {
                        const algorithm = {
                          name: "RSASSA-PKCS1-v1_5",
                          modulusLength: 2048,
                          publicExponent: new Uint8Array([1, 0, 1]),
                      Severity: Minor
                      Found in cypress/integration/oauth2/grant_jwtbearer.js - About 1 hr to fix

                        Method OidcAPIService.SetOidcDynamicClientExecute has 11 return statements (exceeds 4 allowed).
                        Open

                        func (a *OidcAPIService) SetOidcDynamicClientExecute(r ApiSetOidcDynamicClientRequest) (*OAuth2Client, *http.Response, error) {
                            var (
                                localVarHTTPMethod  = http.MethodPut
                                localVarPostBody    interface{}
                                formFiles           []formFile
                        Severity: Major
                        Found in internal/httpclient/api_oidc.go - About 1 hr to fix

                          Method OAuth2APIService.GetOAuth2LoginRequestExecute has 11 return statements (exceeds 4 allowed).
                          Open

                          func (a *OAuth2APIService) GetOAuth2LoginRequestExecute(r ApiGetOAuth2LoginRequestRequest) (*OAuth2LoginRequest, *http.Response, error) {
                              var (
                                  localVarHTTPMethod  = http.MethodGet
                                  localVarPostBody    interface{}
                                  formFiles           []formFile
                          Severity: Major
                          Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix

                            Method OidcAPIService.CreateOidcDynamicClientExecute has 11 return statements (exceeds 4 allowed).
                            Open

                            func (a *OidcAPIService) CreateOidcDynamicClientExecute(r ApiCreateOidcDynamicClientRequest) (*OAuth2Client, *http.Response, error) {
                                var (
                                    localVarHTTPMethod  = http.MethodPost
                                    localVarPostBody    interface{}
                                    formFiles           []formFile
                            Severity: Major
                            Found in internal/httpclient/api_oidc.go - About 1 hr to fix

                              Method OAuth2APIService.GetOAuth2ConsentRequestExecute has 11 return statements (exceeds 4 allowed).
                              Open

                              func (a *OAuth2APIService) GetOAuth2ConsentRequestExecute(r ApiGetOAuth2ConsentRequestRequest) (*OAuth2ConsentRequest, *http.Response, error) {
                                  var (
                                      localVarHTTPMethod  = http.MethodGet
                                      localVarPostBody    interface{}
                                      formFiles           []formFile
                              Severity: Major
                              Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix

                                Method OAuth2APIService.CreateOAuth2ClientExecute has 11 return statements (exceeds 4 allowed).
                                Open

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

                                  Method OAuth2APIService.GetOAuth2LogoutRequestExecute has 11 return statements (exceeds 4 allowed).
                                  Open

                                  func (a *OAuth2APIService) GetOAuth2LogoutRequestExecute(r ApiGetOAuth2LogoutRequestRequest) (*OAuth2LogoutRequest, *http.Response, error) {
                                      var (
                                          localVarHTTPMethod  = http.MethodGet
                                          localVarPostBody    interface{}
                                          formFiles           []formFile
                                  Severity: Major
                                  Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix

                                    Method OAuth2APIService.PatchOAuth2ClientExecute has 11 return statements (exceeds 4 allowed).
                                    Open

                                    func (a *OAuth2APIService) PatchOAuth2ClientExecute(r ApiPatchOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) {
                                        var (
                                            localVarHTTPMethod  = http.MethodPatch
                                            localVarPostBody    interface{}
                                            formFiles           []formFile
                                    Severity: Major
                                    Found in internal/httpclient/api_o_auth2.go - About 1 hr to fix

                                      Function readMigrations has 11 return statements (exceeds 4 allowed).
                                      Open

                                      func readMigrations(migrationSourceFS fs.FS, expectedDialects []string) (map[string]*migrationGroup, error) {
                                          mgs := make(map[string]*migrationGroup)
                                          err := fs.WalkDir(migrationSourceFS, ".", func(p string, d fs.DirEntry, err2 error) error {
                                              if err2 != nil {
                                                  fmt.Println("Warning: unexpected error " + err2.Error())
                                      Severity: Major
                                      Found in cmd/cli/handler_migrate.go - About 1 hr to fix

                                        Method APIClient.prepareRequest has 11 return statements (exceeds 4 allowed).
                                        Open

                                        func (c *APIClient) prepareRequest(
                                            ctx context.Context,
                                            path string, method string,
                                            postBody interface{},
                                            headerParams map[string]string,
                                        Severity: Major
                                        Found in internal/httpclient/client.go - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language