-
- All Implemented Interfaces:
public class JWTAuthHelper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classJWTAuthHelper.Companion
-
Field Summary
Fields Modifier and Type Field Description private final JsonObjectexpireMsgprivate final JsonObjectinvalidMsgprivate final JWTAuthjwtAuthprivate final JWTAuthjwtAuthRefreshprivate final BooleanuseCamelCase
-
Constructor Summary
Constructors Constructor Description JWTAuthHelper(JWTAuth jwtAuth, JWTAuth jwtAuthRefresh, Boolean useCamelCase)
-
Method Summary
Modifier and Type Method Description final JsonObjectgetExpireMsg()final JsonObjectgetInvalidMsg()final JWTAuthgetJwtAuth()final JWTAuthgetJwtAuthRefresh()final BooleangetUseCamelCase()final UnitrefreshToken(String refreshToken, String accessToken, Integer tokenExpireSeconds, Integer refreshExpireSeconds, Boolean refreshAfterExpired, Function2<User, JsonObject, Unit> authHandler)final UnitvalidateToken(String authHeader, Function2<User, JsonObject, Unit> authHandler)final Map<String, String>generateAuthTokens(JsonObject jwtAuthData, Integer tokenExpireSeconds, Integer refreshExpireSeconds)-
-
Constructor Detail
-
JWTAuthHelper
JWTAuthHelper(JWTAuth jwtAuth, JWTAuth jwtAuthRefresh, Boolean useCamelCase)
-
-
Method Detail
-
getExpireMsg
final JsonObject getExpireMsg()
-
getInvalidMsg
final JsonObject getInvalidMsg()
-
getJwtAuth
final JWTAuth getJwtAuth()
-
getJwtAuthRefresh
final JWTAuth getJwtAuthRefresh()
-
getUseCamelCase
final Boolean getUseCamelCase()
-
refreshToken
final Unit refreshToken(String refreshToken, String accessToken, Integer tokenExpireSeconds, Integer refreshExpireSeconds, Boolean refreshAfterExpired, Function2<User, JsonObject, Unit> authHandler)
-
validateToken
final Unit validateToken(String authHeader, Function2<User, JsonObject, Unit> authHandler)
-
-
-
-