janekolszak/idp

View on GitHub

Showing 3 of 25 total issues

Method IDP.NewChallenge has 5 return statements (exceeds 4 allowed).
Open

func (idp *IDP) NewChallenge(ctx context.Context, r *http.Request, user string) (challenge *Challenge, err error) {
    tokenStr := r.FormValue("challenge")
    if tokenStr == "" {
        // No challenge token
        err = ErrorBadRequest
Severity: Major
Found in idp.go - About 35 mins to fix

    Method Challenge.GrantAccessToAll has 5 return statements (exceeds 4 allowed).
    Open

    func (c *Challenge) GrantAccessToAll(w http.ResponseWriter, r *http.Request) error {
        now := time.Now()
    
        token := jwt.New(jwt.SigningMethodRS256)
    
    
    Severity: Major
    Found in challenge.go - About 35 mins to fix

      Method IDP.getChallengeToken has 5 return statements (exceeds 4 allowed).
      Open

      func (idp *IDP) getChallengeToken(challengeString string) (*jwt.Token, error) {
          token, err := jwt.Parse(challengeString, func(token *jwt.Token) (interface{}, error) {
              _, ok := token.Method.(*jwt.SigningMethodRSA)
              if !ok {
                  return nil, ErrorBadSigningMethod
      Severity: Major
      Found in idp.go - About 35 mins to fix
        Severity
        Category
        Status
        Source
        Language