portainer/portainer

View on GitHub
api/http/handler/auth/authenticate_oauth.go

Summary

Maintainability
A
55 mins
Test Coverage

Method Handler.validateOAuth has 9 return statements (exceeds 4 allowed).
Open

func (handler *Handler) validateOAuth(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
    var payload oauthPayload
    err := request.DecodeAndValidateJSONPayload(r, &payload)
    if err != nil {
        return httperror.BadRequest("Invalid request payload", err)
Severity: Major
Found in api/http/handler/auth/authenticate_oauth.go - About 55 mins to fix

    There are no issues that match your filters.

    Category
    Status