Interface AttributeDataAccessProvider
- All Superinterfaces:
ClaimsProvider,DataAccessProvider
DataAccessProvider that is used to fetch attributes from a data source based on a query with the "subject"
as input. An AttributeDataAccessProvider can be thought of as an "enricher" of attributes, as it is most
often used to get extra attributes for a given subject.-
Method Summary
Modifier and TypeMethodDescriptiongetAttributes(String subject) Retrieve Attributes for the provided subject from the backend.default AttributeTableViewgetAttributes(Map<?, ?> subjectMap) Retrieve attributes for the provided subjectdefault AttributeTableViewgetAttributes(SubjectAttributes subjectAttributes) Retrieve Attributes for the provided subject from the backend.default AttributesgetClaimValues(Set<RequestedClaimAttribute> requestedClaimAttributes, Set<ScopeValue> scopeValues, AuthenticationAttributes userAuthenticationAttributes, OAuthClient client) Get the claim values for the requested claims, user and OAuth client.Methods inherited from interface se.curity.identityserver.sdk.claims.ClaimsProvider
getClaimValuesMethods inherited from interface se.curity.identityserver.sdk.datasource.DataAccessProvider
isThreadSafe
-
Method Details
-
getAttributes
Retrieve Attributes for the provided subject from the backend.
The structure of the Attributes is compatible with AttributeTableView, which means that the Attributes are returned using numbered rows, i.e. Name -> Value : "0" -> NestedAttribute( Attribute, Attribute, ...), "1" -> NestedAttribute( ...)
This mimics rows, but there are no requirements on what's inside each row. This means that each row can contain different attributes inside the NestedAttribute, as well as a different number of attributes.
- Parameters:
subject- The subject that is used to substitute in the filter when searching for attributes.- Returns:
- an
AttributeTableViewinstance in the correct format.
-
getAttributes
Retrieve Attributes for the provided subject from the backend.
The structure of the Attributes is compatible with AttributeTableView, which means that the Attributes are returned using numbered rows, i.e. Name -> Value : "0" -> NestedAttribute( Attribute, Attribute, ...), "1" -> NestedAttribute( ...)
This mimics rows, but there are no requirements on what's inside each row. This means that each row can contain different attributes inside the NestedAttribute, as well as a different number of attributes.
- Parameters:
subjectAttributes- the authenticated subject, along with attributes that can be used in filter when searching for attributes- Returns:
- an
AttributeTableViewinstance in the correct format.
-
getAttributes
Retrieve attributes for the provided subjectConvenience method to be used in the transformation procedure scripts.
- Parameters:
subjectMap- Map containing the authenticated subject. Must contain a 'subject'.- Returns:
- an
AttributeTableViewinstance in the correct format. - See Also:
-
getClaimValues
default Attributes getClaimValues(Set<RequestedClaimAttribute> requestedClaimAttributes, Set<ScopeValue> scopeValues, AuthenticationAttributes userAuthenticationAttributes, OAuthClient client) Description copied from interface:ClaimsProviderGet the claim values for the requested claims, user and OAuth client. If no claims are available for the given inputs, returnAttributes.empty()}.- Specified by:
getClaimValuesin interfaceClaimsProvider- Parameters:
requestedClaimAttributes- the attributes to retrieve for a set of claimsscopeValues- the scopes related to the requested attributesuserAuthenticationAttributes- user authentication attributesclient- the OAuth client making the request- Returns:
- attributes representing the claims names and values
-