Showing 412 of 865 total issues
Method DefaultStrategy.requestConsent
has 6 return statements (exceeds 4 allowed). Open
Open
func (s *DefaultStrategy) requestConsent(
ctx context.Context,
w http.ResponseWriter,
r *http.Request,
ar fosite.AuthorizeRequester,
Method OidcAPIService.RevokeOidcSessionExecute
has 6 return statements (exceeds 4 allowed). Open
Open
func (a *OidcAPIService) RevokeOidcSessionExecute(r ApiRevokeOidcSessionRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
Method MigrateHandler.MigrateStatus
has 6 return statements (exceeds 4 allowed). Open
Open
func (h *MigrateHandler) MigrateStatus(cmd *cobra.Command, args []string) error {
p, err := h.makePersister(cmd, args)
if err != nil {
return err
}
Function serve
has 6 return statements (exceeds 4 allowed). Open
Open
func serve(
ctx context.Context,
d driver.Registry,
cmd *cobra.Command,
wg *sync.WaitGroup,
Function NewCreateClientsCommand
has 6 return statements (exceeds 4 allowed). Open
Open
func NewCreateClientsCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "oauth2-client",
Short: "Create an OAuth 2.0 Client",
Aliases: []string{"client"},
Method router.consentGET
has 6 return statements (exceeds 4 allowed). Open
Open
func (rt *router) consentGET(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
req, raw, err := rt.cl.OAuth2API.GetOAuth2ConsentRequest(r.Context()).
ConsentChallenge(r.URL.Query().Get("consent_challenge")).
Execute()
if err != nil {
Method Handler.setOidcDynamicClient
has 6 return statements (exceeds 4 allowed). Open
Open
func (h *Handler) setOidcDynamicClient(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
if err := h.requireDynamicAuth(r); err != nil {
h.r.Writer().WriteError(w, r, err)
return
}
Method Persister.VerifyAndInvalidateConsentRequest
has 6 return statements (exceeds 4 allowed). Open
Open
func (p *Persister) VerifyAndInvalidateConsentRequest(ctx context.Context, verifier string) (_ *flow.AcceptOAuth2ConsentRequest, err error) {
ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.VerifyAndInvalidateConsentRequest")
defer otelx.End(span, &err)
f, err := flowctx.Decode[flow.Flow](ctx, p.r.FlowCipher(), verifier, flowctx.AsConsentVerifier)
Method RegistrySQL.HealthHandler
has 6 return statements (exceeds 4 allowed). Open
Open
func (m *RegistrySQL) HealthHandler() *healthx.Handler {
if m.hh == nil {
m.hh = healthx.NewHandler(m.Writer(), m.buildVersion, healthx.ReadyCheckers{
"database": func(_ *http.Request) error {
return m.Ping()
Function NewUpdateClientCmd
has 6 return statements (exceeds 4 allowed). Open
Open
func NewUpdateClientCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "oauth2-client [id]",
Aliases: []string{"client"},
Short: "Update an OAuth 2.0 Client",
Method Handler.getOidcUserInfo
has 6 return statements (exceeds 4 allowed). Open
Open
func (h *Handler) getOidcUserInfo(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
session := NewSessionWithCustomClaims(ctx, h.c, "")
tokenType, ar, err := h.r.OAuth2Provider().IntrospectToken(ctx, fosite.AccessTokenFromRequest(r), fosite.AccessToken, session)
if err != nil {
Function GetOrGenerateKeys
has 6 return statements (exceeds 4 allowed). Open
Open
func GetOrGenerateKeys(ctx context.Context, r InternalRegistry, m Manager, set, kid, alg string) (private *jose.JSONWebKey, err error) {
getLock(set).Lock()
defer getLock(set).Unlock()
keys, err := m.GetKeySet(ctx, set)
Method GrantValidator.Validate
has 6 return statements (exceeds 4 allowed). Open
Open
func (v *GrantValidator) Validate(request createGrantRequest) error {
if request.Issuer == "" {
return errorsx.WithStack(ErrMissingRequiredParameter.WithHint("Field 'issuer' is required."))
}
Method Persister.findSessionBySignature
has 6 return statements (exceeds 4 allowed). Open
Open
func (p *Persister) findSessionBySignature(ctx context.Context, signature string, session fosite.Session, table tableName) (fosite.Requester, error) {
r := OAuth2RequestSQL{Table: table}
err := p.QueryWithNetwork(ctx).Where("signature = ?", signature).First(&r)
if errors.Is(err, sql.ErrNoRows) {
return nil, errorsx.WithStack(fosite.ErrNotFound)
Method DefaultStrategy.verifyAuthentication
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ctx context.Context,
w http.ResponseWriter,
r *http.Request,
req fosite.AuthorizeRequester,
verifier string,
Function makeOAuth2Request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func makeOAuth2Request(t *testing.T, reg driver.Registry, hc *http.Client, oc *client.Client, values url.Values) (gjson.Result, *http.Response) {
Method DefaultStrategy.requestConsent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ctx context.Context,
w http.ResponseWriter,
r *http.Request,
ar fosite.AuthorizeRequester,
f *flow.Flow,
Function ValidateCsrfSession
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func ValidateCsrfSession(r *http.Request, conf x.CookieConfigProvider, store sessions.Store, name, expectedCSRF string, f *flow.Flow) error {
Function testRegistry
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func testRegistry(t *testing.T, ctx context.Context, k string, t1 driver.Registry, t2 driver.Registry) {
Function cleanupRun
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func cleanupRun(ctx context.Context, notAfter time.Time, limit int, batchSize int, routines ...cleanupRoutine) error {