Package io.inversion.action.security
Class AuthAction.JwtUserDao
java.lang.Object
io.inversion.action.security.AuthAction.JwtUserDao
- All Implemented Interfaces:
AuthAction.UserDao
- Enclosing class:
AuthAction
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPermsToUser(User user, com.auth0.jwt.interfaces.Claim c) protected UsercreateUserFromValidJwt(com.auth0.jwt.interfaces.DecodedJWT jwt) getJwtSecrets(AuthAction action, String apiName, String tenant) Looks gwt signing secrets up as environment vars or sysprops.getUser(AuthAction action, String token, String apiName, String tenant) signJwt(com.auth0.jwt.JWTCreator.Builder jwtBuilder, AuthAction action, String apiName, String tenant) withRevokedTokenCache(AuthAction.JwtUserDao.RevokedTokenCache revokedTokenCache) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inversion.action.security.AuthAction.UserDao
getGuest
-
Constructor Details
-
JwtUserDao
public JwtUserDao()
-
-
Method Details
-
getUser
public User getUser(AuthAction action, String username, String password, String apiName, String tenant) throws ApiException - Specified by:
getUserin interfaceAuthAction.UserDao- Throws:
ApiException
-
getUser
public User getUser(AuthAction action, String token, String apiName, String tenant) throws ApiException - Specified by:
getUserin interfaceAuthAction.UserDao- Throws:
ApiException
-
createUserFromValidJwt
-
addPermsToUser
-
getJwtSecrets
Looks gwt signing secrets up as environment vars or sysprops.Finds the most specific keys keys first.
- Parameters:
action- the action requesting the secretsapiName- the name of the parent apitenant- the tenant if there is one- Returns:
- any jwt secrets found
-
signJwt
public String signJwt(com.auth0.jwt.JWTCreator.Builder jwtBuilder, AuthAction action, String apiName, String tenant) throws IllegalArgumentException, com.auth0.jwt.exceptions.JWTCreationException, UnsupportedEncodingException - Throws:
IllegalArgumentExceptioncom.auth0.jwt.exceptions.JWTCreationExceptionUnsupportedEncodingException
-
getRevokedTokenCache
-
withRevokedTokenCache
public AuthAction.JwtUserDao withRevokedTokenCache(AuthAction.JwtUserDao.RevokedTokenCache revokedTokenCache)
-