Showing 402 of 849 total issues
Method OAuth2ApiService.AcceptOAuth2ConsentRequestExecute
has 67 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *OAuth2ApiService) AcceptOAuth2ConsentRequestExecute(r ApiAcceptOAuth2ConsentRequestRequest) (*OAuth2RedirectTo, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
Method OAuth2ApiService.RejectOAuth2LoginRequestExecute
has 67 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *OAuth2ApiService) RejectOAuth2LoginRequestExecute(r ApiRejectOAuth2LoginRequestRequest) (*OAuth2RedirectTo, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
Method JwkApiService.CreateJsonWebKeySetExecute
has 67 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *JwkApiService) CreateJsonWebKeySetExecute(r ApiCreateJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
Function testRegistry
has 67 lines of code (exceeds 50 allowed). Consider refactoring. Open
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()))
Method Handler.createVerifiableCredential
has 18 return statements (exceeds 4 allowed). Open
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)
Method OAuth2ApiService.AcceptOAuth2LogoutRequestExecute
has 66 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *OAuth2ApiService) AcceptOAuth2LogoutRequestExecute(r ApiAcceptOAuth2LogoutRequestRequest) (*OAuth2RedirectTo, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
Function TestValidateDynamicRegistration
has 66 lines of code (exceeds 50 allowed). Consider refactoring. Open
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"})
Method JwkApiService.SetJsonWebKeyExecute
has 65 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *JwkApiService) SetJsonWebKeyExecute(r ApiSetJsonWebKeyRequest) (*JsonWebKey, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
Method Handler.oauth2TokenExchange
has 65 lines of code (exceeds 50 allowed). Consider refactoring. Open
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)
Function TestAuthCodeWithMockStrategy
has 17 return statements (exceeds 4 allowed). Open
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()
Method OAuth2ApiService.SetOAuth2ClientLifespansExecute
has 64 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *OAuth2ApiService) SetOAuth2ClientLifespansExecute(r ApiSetOAuth2ClientLifespansRequest) (*OAuth2Client, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
Method JwkApiService.GetJsonWebKeyExecute
has 64 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *JwkApiService) GetJsonWebKeyExecute(r ApiGetJsonWebKeyRequest) (*JsonWebKeySet, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
Method MetadataApiService.IsAliveExecute
has 64 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *MetadataApiService) IsAliveExecute(r ApiIsAliveRequest) (*HealthStatus, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
Method MetadataApiService.IsReadyExecute
has 64 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *MetadataApiService) IsReadyExecute(r ApiIsReadyRequest) (*IsReady200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
Method JwkApiService.SetJsonWebKeySetExecute
has 64 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *JwkApiService) SetJsonWebKeySetExecute(r ApiSetJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
Function testHelperExpiryFields
has 64 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func testHelperExpiryFields(reg InternalRegistry) func(t *testing.T) {
return func(t *testing.T) {
m := reg.OAuth2Storage()
t.Parallel()
Function checkTokenResponse
has 64 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func checkTokenResponse(token oauth2token) {
if token.RefreshToken == "" {
log.Fatalf("Expected a refresh token but none received: %+v", token)
}
Method OAuth2ApiService.RevokeOAuth2TokenExecute
has 63 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *OAuth2ApiService) RevokeOAuth2TokenExecute(r ApiRevokeOAuth2TokenRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
Method OAuth2ApiService.TrustOAuth2JwtGrantIssuerExecute
has 63 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *OAuth2ApiService) TrustOAuth2JwtGrantIssuerExecute(r ApiTrustOAuth2JwtGrantIssuerRequest) (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
Method OAuth2ApiService.GetOAuth2ClientExecute
has 63 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (a *OAuth2ApiService) GetOAuth2ClientExecute(r ApiGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile