Class OA2TokenUtils
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.servlet.OA2TokenUtils
-
public class OA2TokenUtils extends Object
Created by Jeff Gaynor
on 5/19/21 at 8:37 AM
-
-
Constructor Summary
Constructors Constructor Description OA2TokenUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AccessTokenImplgetAT(String subjectToken, OA2SE oa2se, edu.uiuc.ncsa.security.util.jwk.JSONWebKeys keys, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)Takes the subjectToken from the raw input (performing a base 32 decoding if needed) and returns the access token.static IDTokenImplgetIDToken(String subjectToken, OA2SE oa2SE, edu.uiuc.ncsa.security.util.jwk.JSONWebKeys keys, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)Given the raw token (which is only a JWT), recover the ID token.static edu.uiuc.ncsa.security.util.jwk.JSONWebKeysgetKeys(OA2SE oa2se, OA2Client client)Get the right set of keys, either from the service environment or the correct virtual organization.static RefreshTokenImplgetRT(String subjectToken, OA2SE oa2SE, edu.uiuc.ncsa.security.util.jwk.JSONWebKeys keys, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)Takes the subjectToken from the raw input (performing a base 32 decoding if needed) and returns the refresh token.protected static OA2ServiceTransactiongetTransactionFromTX(OA2SE oa2se, URI jti, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)static OA2ServiceTransactiongetTransactionFromTX(OA2SE oa2se, AccessTokenImpl accessToken, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)Given an access token (and transaction if available), Find the actual transaction.static OA2ServiceTransactiongetTransactionFromTX(OA2SE oa2se, IDTokenImpl idToken, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)static OA2ServiceTransactiongetTransactionFromTX(OA2SE oa2se, RefreshTokenImpl refreshToken, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)
-
-
-
Method Detail
-
getKeys
public static edu.uiuc.ncsa.security.util.jwk.JSONWebKeys getKeys(OA2SE oa2se, OA2Client client)
Get the right set of keys, either from the service environment or the correct virtual organization.- Parameters:
oa2se-client-- Returns:
-
getAT
public static AccessTokenImpl getAT(String subjectToken, OA2SE oa2se, edu.uiuc.ncsa.security.util.jwk.JSONWebKeys keys, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)
Takes the subjectToken from the raw input (performing a base 32 decoding if needed) and returns the access token.- Parameters:
subjectToken-oa2se-keys-- Returns:
-
getIDToken
public static IDTokenImpl getIDToken(String subjectToken, OA2SE oa2SE, edu.uiuc.ncsa.security.util.jwk.JSONWebKeys keys, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)
Given the raw token (which is only a JWT), recover the ID token.- Parameters:
subjectToken-oa2SE-keys-debugger-- Returns:
-
getRT
public static RefreshTokenImpl getRT(String subjectToken, OA2SE oa2SE, edu.uiuc.ncsa.security.util.jwk.JSONWebKeys keys, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)
Takes the subjectToken from the raw input (performing a base 32 decoding if needed) and returns the refresh token.- Parameters:
subjectToken-oa2SE-keys-- Returns:
-
getTransactionFromTX
public static OA2ServiceTransaction getTransactionFromTX(OA2SE oa2se, AccessTokenImpl accessToken, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger) throws IOException
Given an access token (and transaction if available), Find the actual transaction. This may involve a look up in the tx store- Parameters:
accessToken-oa2se-- Returns:
- Throws:
IOException
-
getTransactionFromTX
public static OA2ServiceTransaction getTransactionFromTX(OA2SE oa2se, RefreshTokenImpl refreshToken, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger) throws IOException
- Throws:
IOException
-
getTransactionFromTX
public static OA2ServiceTransaction getTransactionFromTX(OA2SE oa2se, IDTokenImpl idToken, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger) throws IOException
- Throws:
IOException
-
getTransactionFromTX
protected static OA2ServiceTransaction getTransactionFromTX(OA2SE oa2se, URI jti, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)
-
-