Showing 6 of 6 total issues
Method MockOIDC.Token
has 8 return statements (exceeds 4 allowed). Open
Open
func (m *MockOIDC) Token(rw http.ResponseWriter, req *http.Request) {
err := req.ParseForm()
if err != nil {
internalServerError(rw, err.Error())
return
Method MockOIDC.Authorize
has 8 return statements (exceeds 4 allowed). Open
Open
func (m *MockOIDC) Authorize(rw http.ResponseWriter, req *http.Request) {
err := req.ParseForm()
if err != nil {
internalServerError(rw, err.Error())
return
Method SessionStore.NewSession
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (ss *SessionStore) NewSession(scope string, nonce string, user User, codeChallenge string, codeChallengeMethod string) (*Session, error) {
Method MockOIDC.validateRefreshGrant
has 5 return statements (exceeds 4 allowed). Open
Open
func (m *MockOIDC) validateRefreshGrant(rw http.ResponseWriter, req *http.Request) (*Session, bool) {
if !assertPresence([]string{"refresh_token"}, rw, req) {
return nil, false
}
Method MockOIDC.authorizeToken
has 5 return statements (exceeds 4 allowed). Open
Open
func (m *MockOIDC) authorizeToken(t string, rw http.ResponseWriter) (*jwt.Token, bool) {
token, err := m.Keypair.VerifyJWT(t, m.Now)
if err != nil {
errorResponse(rw, InvalidRequest, fmt.Sprintf("Invalid token: %v", err), http.StatusUnauthorized)
return nil, false
Method MockOIDC.validateCodeChallenge
has 5 return statements (exceeds 4 allowed). Open
Open
func (m *MockOIDC) validateCodeChallenge(rw http.ResponseWriter, req *http.Request, session *Session) bool {
if session.CodeChallenge == "" || session.CodeChallengeMethod == "" {
return true
}