public class TokenUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SIGNING_HMAC_SECRET_ALIAS |
| Constructor and Description |
|---|
TokenUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getSignatureAlgorithm(String configuredSignatureAlgorithm,
AliasService aliasService,
String signingKeystoreName) |
static String |
getThumbprint(RSAPublicKey publicKey,
String hashAlgorithm)
Utility method to calculate public key thumbprint
|
static String |
getTokenId(JWT token)
Extract the unique Knox token identifier from the specified JWT's claim set.
|
static boolean |
isServerManagedTokenStateEnabled(javax.servlet.FilterConfig filterConfig)
Determine if server-managed token state is enabled for a provider, based on configuration.
|
public static final String SIGNING_HMAC_SECRET_ALIAS
public static String getTokenId(JWT token)
token - A JWTpublic static boolean isServerManagedTokenStateEnabled(javax.servlet.FilterConfig filterConfig)
filterConfig - A FilterConfig object.public static String getSignatureAlgorithm(String configuredSignatureAlgorithm, AliasService aliasService, String signingKeystoreName) throws AliasServiceException
configuredSignatureAlgorithm if any OR the default HMAC algorithm if useHMAC(char[], String) is
true; the default RSA algorithm otherwiseAliasServiceExceptionpublic static String getThumbprint(RSAPublicKey publicKey, String hashAlgorithm) throws com.nimbusds.jose.JOSEException
publicKey - hashAlgorithm - com.nimbusds.jose.JOSEExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.