Showing 412 of 865 total issues
Method JwkAPIService.DeleteJsonWebKeyExecute
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *JwkAPIService) DeleteJsonWebKeyExecute(r ApiDeleteJsonWebKeyRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
Method DefaultStrategy.verifyConsent
has 12 return statements (exceeds 4 allowed). Open
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
Function TestJWTBearer
has 12 return statements (exceeds 4 allowed). Open
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)
Method OAuth2APIService.DeleteTrustedOAuth2JwtGrantIssuerExecute
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *OAuth2APIService) DeleteTrustedOAuth2JwtGrantIssuerExecute(r ApiDeleteTrustedOAuth2JwtGrantIssuerRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
Method OAuth2APIService.DeleteOAuth2ClientExecute
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *OAuth2APIService) DeleteOAuth2ClientExecute(r ApiDeleteOAuth2ClientRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
Method OidcAPIService.DeleteOidcDynamicClientExecute
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *OidcAPIService) DeleteOidcDynamicClientExecute(r ApiDeleteOidcDynamicClientRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
Method MetadataAPIService.GetVersionExecute
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *MetadataAPIService) GetVersionExecute(r ApiGetVersionRequest) (*GetVersion200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
Method JwkAPIService.DeleteJsonWebKeySetExecute
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *JwkAPIService) DeleteJsonWebKeySetExecute(r ApiDeleteJsonWebKeySetRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
Function NewCreateClientsCommand
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func NewCreateClientsCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "oauth2-client",
Short: "Create an OAuth 2.0 Client",
Aliases: []string{"client"},
Function NewOidcConfiguration
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func NewOidcConfiguration(authorizationEndpoint string, idTokenSignedResponseAlg []string, idTokenSigningAlgValuesSupported []string, issuer string, jwksUri string, responseTypesSupported []string, subjectTypesSupported []string, tokenEndpoint string, userinfoSignedResponseAlg []string) *OidcConfiguration {
Function initTestKeyPairs
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const initTestKeyPairs = async () => {
const algorithm = {
name: "RSASSA-PKCS1-v1_5",
modulusLength: 2048,
publicExponent: new Uint8Array([1, 0, 1]),
Method OidcAPIService.SetOidcDynamicClientExecute
has 11 return statements (exceeds 4 allowed). Open
Open
func (a *OidcAPIService) SetOidcDynamicClientExecute(r ApiSetOidcDynamicClientRequest) (*OAuth2Client, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
Method OAuth2APIService.GetOAuth2LoginRequestExecute
has 11 return statements (exceeds 4 allowed). Open
Open
func (a *OAuth2APIService) GetOAuth2LoginRequestExecute(r ApiGetOAuth2LoginRequestRequest) (*OAuth2LoginRequest, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
Method OidcAPIService.CreateOidcDynamicClientExecute
has 11 return statements (exceeds 4 allowed). Open
Open
func (a *OidcAPIService) CreateOidcDynamicClientExecute(r ApiCreateOidcDynamicClientRequest) (*OAuth2Client, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
Method OAuth2APIService.GetOAuth2ConsentRequestExecute
has 11 return statements (exceeds 4 allowed). Open
Open
func (a *OAuth2APIService) GetOAuth2ConsentRequestExecute(r ApiGetOAuth2ConsentRequestRequest) (*OAuth2ConsentRequest, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
Method OAuth2APIService.CreateOAuth2ClientExecute
has 11 return statements (exceeds 4 allowed). Open
Open
func (a *OAuth2APIService) CreateOAuth2ClientExecute(r ApiCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
Method OAuth2APIService.GetOAuth2LogoutRequestExecute
has 11 return statements (exceeds 4 allowed). Open
Open
func (a *OAuth2APIService) GetOAuth2LogoutRequestExecute(r ApiGetOAuth2LogoutRequestRequest) (*OAuth2LogoutRequest, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
Method OAuth2APIService.PatchOAuth2ClientExecute
has 11 return statements (exceeds 4 allowed). Open
Open
func (a *OAuth2APIService) PatchOAuth2ClientExecute(r ApiPatchOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
Function readMigrations
has 11 return statements (exceeds 4 allowed). Open
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())
Method APIClient.prepareRequest
has 11 return statements (exceeds 4 allowed). Open
Open
func (c *APIClient) prepareRequest(
ctx context.Context,
path string, method string,
postBody interface{},
headerParams map[string]string,