Class UITokenUtils
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.tokens.UITokenUtils
-
public class UITokenUtils extends Object
Mostly this is used in theUserInfoServlet
where the handling has to be a bit different than in the token endpoint.Created by Jeff Gaynor
on 5/3/21 at 4:02 PM
-
-
Constructor Summary
Constructors Constructor Description UITokenUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AccessTokenImpl
getAT(String rawAT)
Given a string of some token (unknown format, e.g.static String
getRawAT(javax.servlet.http.HttpServletRequest request)
Gets the current raw access token from either the header or as a parameter.static RefreshTokenImpl
getRT(String rawRT)
-
-
-
Method Detail
-
getAT
public static AccessTokenImpl getAT(String rawAT)
Given a string of some token (unknown format, e.g. from a header or passed in as a parameter) return an access token.
Note this does not verify the token if it's a JWT! This is because one usage pattern forVirtualOrganization
is to get the token, find the transaction, read the client, then determine the VO and check the keys. This call lets you bootstrap that process.- Parameters:
rawAT
-- Returns:
-
getRT
public static RefreshTokenImpl getRT(String rawRT)
-
getRawAT
public static String getRawAT(javax.servlet.http.HttpServletRequest request)
Gets the current raw access token from either the header or as a parameter. This throws an exception none is found. Pass the result off togetAT(String)
to ferret out the actual- Parameters:
request
-- Returns:
-
-