chore(easyauth) valide
This commit is contained in:
parent
387b59789b
commit
1e61d9dd15
1 changed files with 5 additions and 0 deletions
|
@ -51,6 +51,11 @@ func (e EasyAuth) GetUser(w http.ResponseWriter, r *http.Request) (AuthentikUser
|
|||
return e.jwtSecret, nil
|
||||
})
|
||||
|
||||
if !parsedAccessToken.Valid {
|
||||
e.redirectAuth(w, r)
|
||||
return AuthentikUser{}, false, nil
|
||||
}
|
||||
|
||||
claims := parsedAccessToken.Claims.(*UserClaims)
|
||||
|
||||
return claims.User, true, nil
|
||||
|
|
Loading…
Reference in a new issue