Interface JwtUserProvider<T extends Login>
- Type Parameters:
T- the generic type
- All Superinterfaces:
UserProvider<T>
The Interface JwtUserProvider.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe Interface TokenSettings. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault Userauthenticate(jakarta.servlet.http.HttpServletRequest rq) Authenticate.default SecretKeyCreates the key.default StringcreateToken(JwtUserProvider.TokenSettings settings, boolean prolongable, boolean verify, User user) Creates the token.deserialize(String json, String token) Deserialize.Gets the settings.default Userparse(String token, JwtUserProvider.TokenSettings settings) Parses the.Serialize.verify(io.jsonwebtoken.Claims claims) Verify.Methods inherited from interface org.cibseven.webapp.auth.providers.UserProvider
getUserInfo, login, logout
-
Field Details
-
BEARER_PREFIX
The Constant BEARER_PREFIX.- See Also:
-
UTF8
The Constant UTF8.
-
-
Method Details
-
getSettings
JwtUserProvider.TokenSettings getSettings()Gets the settings.- Returns:
- the settings
-
authenticate
Description copied from interface:UserProviderAuthenticate.- Specified by:
authenticatein interfaceUserProvider<T extends Login>- Parameters:
rq- the rq- Returns:
- the user
-
parse
Parses the.- Parameters:
token- the tokensettings- the settings- Returns:
- the user
-
deserialize
Deserialize.- Parameters:
json- the jsontoken- the token- Returns:
- the user
-
verify
Verify.- Parameters:
claims- the claims- Returns:
- null if the user was changed (especially password) after the token was issued or a user if it hasn't changed in the meantime
-
createToken
default String createToken(JwtUserProvider.TokenSettings settings, boolean prolongable, boolean verify, User user) Creates the token.- Parameters:
settings- the settingsprolongable- the prolongableverify- the verifyuser- the user- Returns:
- the string
-
createKey
Creates the key.- Parameters:
secret- the secret- Returns:
- the secret key
-
serialize
Serialize.- Parameters:
user- the user- Returns:
- the string
-