New utility method to access the `access-token` string

This commit is contained in:
Mauro Mugnaini 2021-05-24 18:45:20 +02:00
parent b54c49527c
commit 00dc6538a9
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ public class JWTTokenUtil {
return token.getRaw(); return token.getRaw();
} }
public static String getAccessTokenString(JWTToken token) {
return token.getAccessTokenString();
}
public static JWTToken getOIDCFromRequest(HttpServletRequest request) { public static JWTToken getOIDCFromRequest(HttpServletRequest request) {
return JWTToken.fromString((String) request.getAttribute(OIDC_TOKEN_ATTRIBUTE)); return JWTToken.fromString((String) request.getAttribute(OIDC_TOKEN_ATTRIBUTE));
} }