Class OA2TokenUtils


  • public class OA2TokenUtils
    extends Object

    Created by Jeff Gaynor
    on 5/19/21 at 8:37 AM

    • Constructor Detail

      • OA2TokenUtils

        public OA2TokenUtils()
    • 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:
      • 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

        protected static OA2ServiceTransaction getTransactionFromTX​(OA2SE oa2se,
                                                                    URI jti,
                                                                    edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger)