예제 #1
0
func (backend *JWTAuthenticationBackend) IsInBlacklist(token string) bool {

	return false
	redisConn := redis.Connect()
	redisToken, _ := redisConn.GetValue(token)

	if redisToken == nil {
		return false
	}

	return true
}
예제 #2
0
func (backend *JWTAuthenticationBackend) Logout(tokenString string, token *jwt.Token) error {

	redisConn := redis.Connect()
	return redisConn.SetValue(tokenString, tokenString, backend.getTokenRemainingValidity(token.Claims["exp"]))
}