Interface AttributeRepository
- All Superinterfaces:
ClaimsProvider
AttributeRepository is used to fetch attributes from a contained data source based on a query with the
"subject" as input. An AttributeRepository 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.getAttributes(Map<?, ?> subjectMap) Retrieve attributes for the provided subjectgetAttributes(SubjectAttributes subjectAttributes) Retrieve Attributes for the provided subject from the backend.Methods inherited from interface se.curity.identityserver.sdk.claims.ClaimsProvider
getClaimValues, getClaimValues
-
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:
-