Showing 402 of 849 total issues
Function New
has 6 return statements (exceeds 4 allowed). Open
Open
func New(ctx context.Context, sl *servicelocatorx.Options, opts []OptionsModifier) (Registry, error) {
o := newOptions()
for _, f := range opts {
f(o)
}
Method RegistryBase.HealthHandler
has 6 return statements (exceeds 4 allowed). Open
Open
func (m *RegistryBase) HealthHandler() *healthx.Handler {
if m.hh == nil {
m.hh = healthx.NewHandler(m.Writer(), m.buildVersion, healthx.ReadyCheckers{
"database": func(_ *http.Request) error {
return m.r.Ping()
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
}
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"},
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 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 {
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)
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 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.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,
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 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 UpdateClientTokenLifespans
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func UpdateClientTokenLifespans(t *testing.T, conf *oauth2.Config, clientID string, lifespans client.Lifespans, adminTS *httptest.Server) {
Function newRegistryDefault
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func newRegistryDefault(t testing.TB, url string, c *config.DefaultProvider, migrate bool, ctxer contextx.Contextualizer) 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 {
Function NewOAuth2LoginRequest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func NewOAuth2LoginRequest(challenge string, client OAuth2Client, requestUrl string, skip bool, subject string) *OAuth2LoginRequest {
Method Persister.sqlSchemaFromRequest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (p *Persister) sqlSchemaFromRequest(ctx context.Context, signature string, r fosite.Requester, table tableName, expiresAt time.Time) (*OAuth2RequestSQL, error) {
Function TestHelperManagerKeySet
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func TestHelperManagerKeySet(m Manager, algo string, keys *jose.JSONWebKeySet, suffix string, parallel bool) func(t *testing.T) {
Function doTestCommit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func doTestCommit(m InternalRegistry, t *testing.T,
createFn func(context.Context, string, fosite.Requester) error,
getFn func(context.Context, string, fosite.Session) (fosite.Requester, error),
revokeFn func(context.Context, string) error,