Interface BucketDataAccessProvider
- All Superinterfaces:
DataAccessProvider
A
DataAccessProvider for reading and storing arbitrary attributes.
All implementations and backing data sources are expected to treat subject and purpose as a composite key, meaning that the same subject may be reused for multiple purposes, but it's associated attributes will always be unique for a given purpose.
The data model currently supports updating the entire attributes object in place, i.e. the attributes are first to be fetched, updated and then stored back.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanclearBucket(String subject, String purpose) Delete all attributes on a given subject and purpose.getAttributes(String subject, String purpose) Get all attributes associated with the given subject and purpose.Persist provided attributes for the given subject and purpose.Methods inherited from interface se.curity.identityserver.sdk.datasource.DataAccessProvider
isThreadSafe
-
Method Details
-
getAttributes
Get all attributes associated with the given subject and purpose.- Parameters:
subject- The subject for which to get attributespurpose- The purpose (i.e. "action") for which the subject's attributes should be retrieved for- Returns:
- All attributes found for the given subject and purpose (empty if no attributes found)
-
storeAttributes
Persist provided attributes for the given subject and purpose. This method overwrites any previous attributes.- Parameters:
subject- The subject for which to store attributespurpose- The purpose for which the stored attributes are storedattributes- The attributes- Returns:
- The attributes that were stored with the request
-
clearBucket
Delete all attributes on a given subject and purpose.- Parameters:
subject- The subject for which to delete any stored attributespurpose- The purpose for which to delete any stored attributes- Returns:
- Whether anything was deleted as a result of this method being called
-