palourde/uchiwa

View on GitHub
uchiwa/authentication/jwt.go

Summary

Maintainability
A
35 mins
Test Coverage

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

func verifyJWT(tokenString string) (*jwt.Token, error) {
    token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) {
        // Don't forget to validate the alg is what you expect:
        if _, ok := token.Method.(*jwt.SigningMethodRSA); !ok {
            logger.Debugf("Unexpected signing method: %v", token.Header["alg"])
Severity: Major
Found in uchiwa/authentication/jwt.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status