Package com.sun.identity.coretoken.spi
Interface CoreTokenStore
-
- All Known Implementing Classes:
OpenSSOCoreTokenStore
public interface CoreTokenStoreThisCoreTokenStoreinterface defines methods for managing resources of the OpenSSO Core Token service.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringcreateToken(Subject subject, org.json.JSONObject attributes)Creates a token.voiddeleteToken(Subject subject, String tokenId)Deletes a token.StringreadToken(Subject subject, String tokenId)Reads token attributes.org.json.JSONArraysearchTokens(Subject subject, String queryString)Searches tokens.voidupdateToken(Subject subject, String tokenId, String eTag, org.json.JSONObject newVals)Updates a token.
-
-
-
Method Detail
-
createToken
String createToken(Subject subject, org.json.JSONObject attributes) throws CoreTokenException, org.json.JSONException
Creates a token.- Parameters:
subject- Subject of the caller.attributes- Attributes of the token to be created.- Returns:
- JSON-encoded token.id attribute.
- Throws:
CoreTokenException- if failed to create the token.org.json.JSONException- if failed to parse the JSON-encoded token attributes.
-
readToken
String readToken(Subject subject, String tokenId) throws CoreTokenException
Reads token attributes.- Parameters:
subject- Subject of the caller.tokenId- token.id of the token to be retrieved.- Returns:
- JSON-encoded token attributes.
- Throws:
CoreTokenException- if failed to read the token.
-
deleteToken
void deleteToken(Subject subject, String tokenId) throws CoreTokenException
Deletes a token.- Parameters:
subject- Subject of the callertokenId- token.id of the token to be deleted.- Throws:
CoreTokenException- if failed to delete the token.org.json.JSONException- if failed to parse the JSON-encoded token attributes.
-
searchTokens
org.json.JSONArray searchTokens(Subject subject, String queryString) throws CoreTokenException
Searches tokens.- Parameters:
subject- Subject of the callerqueryString- HTTP query string.- Returns:
- JSON array of token.id values for resources that match the query. May be empty.
- Throws:
CoreTokenException
-
updateToken
void updateToken(Subject subject, String tokenId, String eTag, org.json.JSONObject newVals) throws CoreTokenException, org.json.JSONException
Updates a token.- Parameters:
subject- caller subject.tokenId- token.id of the token to be updated.eTag- etag attribute value, this must match that presents in the the token to be updated.newVals- attributes to be updated.- Throws:
CoreTokenException- if failed to update the token.org.json.JSONException- if failed to parse the JSON-encoded attributes.
-
-