pstuifzand/ekster

View on GitHub
cmd/eksterd/auth.go

Summary

Maintainability
A
1 hr
Test Coverage

Function checkAuthToken has 6 return statements (exceeds 4 allowed).
Open

func checkAuthToken(header string, tokenEndpoint string, token *auth.TokenResponse) (bool, error) {
    req, err := buildValidateAuthTokenRequest(tokenEndpoint, header)
    if err != nil {
        return false, err
    }
Severity: Major
Found in cmd/eksterd/auth.go - About 40 mins to fix

Function cachedCheckAuthToken has 5 return statements (exceeds 4 allowed).
Open

func cachedCheckAuthToken(conn redis.Conn, header string, tokenEndpoint string, r *auth.TokenResponse) (bool, error) {
    tokens := authHeaderRegex.FindStringSubmatch(header)

    if len(tokens) != 2 {
        return false, fmt.Errorf("could not find token in header")
Severity: Major
Found in cmd/eksterd/auth.go - About 35 mins to fix

There are no issues that match your filters.

Category
Status