Interface ITokenWebService
Every SCIM service operation that returns resources (e.g Users, Groups, etc.) offers the possibility to specify which attributes can be included for every resource part of the response. The default behavior is returning those attributes that according to the resource Schema have returnability = "always" in addition to those with returnability = "default".
attrsList is used to override the default attribute set, so when supplying a not-null or not empty String, the attributes included in the resource(s) of the response will be those with returnability = "always" as well as those specified by attrsList.
This parameter consists of a comma-separated list of attribute names. An example of a valid value for attrsList
when the resource of interest is User, could be: userName, active, name.familyName, addresses, emails.value, emails.type,
urn:ietf:params:scim:schemas:extension:gluu:2.0:User:myCustomAttribute
Note that attributes marked with returnability = "never" (such as a User password) will always be filtered out from the output, so including such attributes in attrsList has no effect.
excludedAttrsList is used to specify the set of attributes that should be excluded from the default attribute set. In this sense, the resources found in the response will include the attributes whose returnability = "always" in addition to those with returnability = "default" except for those included in excludedAttrsList. As with attrsList, this parameter must be in the form of a comma-separated list of attribute names.
attrsList and excludedAttrsList are mutually exclusive: if both are provided only attrsList will be taken into account to compute the output attribute set.
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsegetTokensMetadata(String id, String attrsList, String excludedAttrsList) Service method that retrieves token metadata associated to a given userjakarta.ws.rs.core.ResponserevokeTokens(String id, String hash) Revokes one or more tokens associated to a given user.
-
Method Details
-
getTokensMetadata
@Path("/v2/UserTokens/{id}") @GET @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"}) jakarta.ws.rs.core.Response getTokensMetadata(@PathParam("id") String id, @QueryParam("attributes") String attrsList, @QueryParam("excludedAttributes") String excludedAttrsList) Service method that retrieves token metadata associated to a given user- Parameters:
id- The "id" attribute of the user in questionattrsList- See notes about attributes query param in this interface descriptionexcludedAttrsList- See notes about excludedAttributes query param in this interface description- Returns:
- An object abstracting the response obtained from the server to this request.
A succesful response for this operation should contain a status code of 200 and a
ListResponsein the entity body (holding a collection of SCIM token resources, seeTokenResource)
-
revokeTokens
@Path("/v2/UserTokens/{id}") @DELETE @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"}) jakarta.ws.rs.core.Response revokeTokens(@PathParam("id") String id, @QueryParam("tokenHash") String hash) Revokes one or more tokens associated to a given user. All tokens associated to the token that matches the hash passed as input are removed (as long as they are tied to the user identified by the value passed)- Parameters:
id- The "id" attribute of the user in questionhash- The token hash. This is a value found in the response of method getTokensMetadata- Returns:
- An object abstracting the response obtained from the server to this request. A succesful response for this operation should contain a status code of 204 (no content)
-