Package com.appslandia.plum.base
Class JwtPrincipal
- java.lang.Object
-
- javax.security.enterprise.CallerPrincipal
-
- com.appslandia.plum.base.UserPrincipal
-
- com.appslandia.plum.base.JwtPrincipal
-
- All Implemented Interfaces:
Principal
public class JwtPrincipal extends UserPrincipal
- Author:
- Loc Ha
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_DISPLAY_NAMEstatic StringKEY_USER_IDstatic StringKEY_USER_NAMEstatic StringKEY_USER_ROLES
-
Constructor Summary
Constructors Constructor Description JwtPrincipal(com.appslandia.common.jwt.JwtToken token)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDisplayName()com.appslandia.common.jwt.JwtTokengetToken()intgetUserId()-
Methods inherited from class com.appslandia.plum.base.UserPrincipal
getModule, getReauthAt, isRememberMe
-
-
-
-
Field Detail
-
KEY_USER_ID
public static final String KEY_USER_ID
- See Also:
- Constant Field Values
-
KEY_USER_NAME
public static final String KEY_USER_NAME
- See Also:
- Constant Field Values
-
KEY_DISPLAY_NAME
public static final String KEY_DISPLAY_NAME
- See Also:
- Constant Field Values
-
KEY_USER_ROLES
public static final String KEY_USER_ROLES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUserId
public int getUserId()
- Overrides:
getUserIdin classUserPrincipal
-
getDisplayName
public String getDisplayName()
- Overrides:
getDisplayNamein classUserPrincipal
-
getToken
public com.appslandia.common.jwt.JwtToken getToken()
-
-