public class JWTUtils
extends java.lang.Object
| Constructor | Description |
|---|---|
JWTUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
constructURLWithHostname(java.lang.String originalUrl) |
Replace IP to hostname in URL
|
static java.lang.String |
getJWTFromCookie(javax.servlet.http.HttpServletRequest req) |
Encapsulate the acquisition of the JWT token from HTTP cookies within the
request.
|
static java.lang.String |
replaceHostInUrl(java.net.URI originalUri,
java.lang.String newAuthority) |
Replace hostname in URL
|
static boolean |
validateToken(com.auth0.jwt.interfaces.DecodedJWT jwtToken) |
This method provides a single method for validating the JWT for use in
request processing.
|
static com.auth0.jwt.interfaces.DecodedJWT |
verifyToken(com.auth0.jwt.interfaces.DecodedJWT jwt) |
public static boolean validateToken(com.auth0.jwt.interfaces.DecodedJWT jwtToken)
throws java.security.InvalidParameterException
jwtToken - the token to validatejava.security.InvalidParameterExceptionpublic static com.auth0.jwt.interfaces.DecodedJWT verifyToken(com.auth0.jwt.interfaces.DecodedJWT jwt)
throws java.security.InvalidParameterException
java.security.InvalidParameterExceptionpublic static java.lang.String getJWTFromCookie(javax.servlet.http.HttpServletRequest req)
req - servlet request to get the JWT token frompublic static java.lang.String constructURLWithHostname(java.lang.String originalUrl)
originalUrl - original URLpublic static java.lang.String replaceHostInUrl(java.net.URI originalUri,
java.lang.String newAuthority)
originalUri - old hostnamenewAuthority - new hostnameCopyright © 2008–2025 Apache Software Foundation. All rights reserved.