Showing 402 of 849 total issues
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
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"},
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 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 DefaultStrategy.verifyConsent
has 11 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
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 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.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.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.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.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,
Function NewPerformAuthorizationCodeCmd
has 11 return statements (exceeds 4 allowed). Open
Open
func NewPerformAuthorizationCodeCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "authorization-code",
Example: "{{ .CommandPath }} --client-id ... --client-secret ...",
Short: "An exemplary OAuth 2.0 Client performing the OAuth 2.0 Authorize Code Flow",
Method Handler.rejectOAuth2ConsentRequest
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (h *Handler) rejectOAuth2ConsentRequest(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
ctx := r.Context()
challenge := stringsx.Coalesce(
r.URL.Query().Get("consent_challenge"),
Function TestHelperNID
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func TestHelperNID(r interface {
client.ManagerProvider
FlowCipher() *aead.XChaCha20Poly1305
}, t1ValidNID consent.Manager, t2InvalidNID consent.Manager) func(t *testing.T) {
testClient := client.Client{ID: "2022-03-11-client-nid-test-1"}
Function TestGetLoginRequestWithDuplicateAccept
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func TestGetLoginRequestWithDuplicateAccept(t *testing.T) {
t.Run("Test get login request with duplicate accept", func(t *testing.T) {
ctx := context.Background()
challenge := "challenge"
requestURL := "http://192.0.2.1"