Class OpenSSOCoreTokenStore

  • All Implemented Interfaces:
    CoreTokenStore

    public class OpenSSOCoreTokenStore
    extends Object
    implements CoreTokenStore
    This OpenSSOCoreTokenStore implements the core token store using SM store.
    • Field Detail

      • JSON_ATTR

        public static String JSON_ATTR
      • SEARCHABLE_ATTR

        public static String SEARCHABLE_ATTR
      • ETAG_ATTR

        public static String ETAG_ATTR
      • SERVICE_DN

        public static final String SERVICE_DN
    • Constructor Detail

      • OpenSSOCoreTokenStore

        public OpenSSOCoreTokenStore()
    • Method Detail

      • createToken

        public String createToken​(Subject subject,
                                  org.json.JSONObject attributes)
                           throws CoreTokenException,
                                  org.json.JSONException
        Description copied from interface: CoreTokenStore
        Creates a token.
        Specified by:
        createToken in interface CoreTokenStore
        Parameters:
        subject - the subject containing the admin token requesting token creation
        attributes - the token attributes in JSON format
        Returns:
        the created token in JSON format
        Throws:
        CoreTokenException - if the token cannot be created
        org.json.JSONException - if the JSON attributes cannot be processed
      • searchTokens

        public org.json.JSONArray searchTokens​(Subject subject,
                                               String queryString)
                                        throws CoreTokenException
        Description copied from interface: CoreTokenStore
        Searches tokens.
        Specified by:
        searchTokens in interface CoreTokenStore
        Parameters:
        subject - the subject containing the admin token requesting the search
        queryString - the query string used to match tokens
        Returns:
        JSON array of tokens matching the queryString
        Throws:
        CoreTokenException - if the search cannot be performed
      • updateToken

        public void updateToken​(Subject subject,
                                String tokenId,
                                String eTag,
                                org.json.JSONObject newVals)
                         throws CoreTokenException,
                                org.json.JSONException
        Updates a token.
        Specified by:
        updateToken in interface CoreTokenStore
        Parameters:
        subject - caller subject.
        tokenId - token.id of the token to be updated.
        eTag - the entity tag of the token used for optimistic concurrency
        newVals - the new values to apply to the token in JSON format
        Throws:
        CoreTokenException - if the token cannot be updated
        org.json.JSONException - if the JSON values cannot be processed
      • getCoreTokenDN

        public static String getCoreTokenDN​(String tokenId)