public class JwtAuthenticator extends Object implements TokenAuthenticator
AuthenticatorProfileCreator
.Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
JwtAuthenticator() |
JwtAuthenticator(String signingSecret) |
JwtAuthenticator(String signingSecret,
String encryptionSecret) |
Modifier and Type | Method and Description |
---|---|
String |
getEncryptionSecret() |
String |
getSigningSecret() |
void |
setEncryptionSecret(String encryptionSecret) |
void |
setSecret(String secret)
Deprecated.
|
void |
setSigningSecret(String signingSecret) |
void |
validate(TokenCredentials credentials)
Validate the credentials.
|
UserProfile |
validateToken(String token)
Validates the token and returns the corresponding user profile.
|
public JwtAuthenticator()
public JwtAuthenticator(String signingSecret)
public UserProfile validateToken(String token)
token
- the JWTpublic void validate(TokenCredentials credentials)
CredentialsException
in case of failure.validate
in interface Authenticator<TokenCredentials>
validate
in interface TokenAuthenticator
credentials
- the given credentials.public String getSigningSecret()
public void setSigningSecret(String signingSecret)
public String getEncryptionSecret()
public void setEncryptionSecret(String encryptionSecret)
@Deprecated public void setSecret(String secret)
Copyright © 2016. All rights reserved.