Interface AttributeDataAccessProvider

All Superinterfaces:
ClaimsProvider, DataAccessProvider

public interface AttributeDataAccessProvider extends DataAccessProvider, ClaimsProvider
A 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 Details

    • getAttributes

      AttributeTableView getAttributes(String subject)

      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 AttributeTableView instance in the correct format.
    • getAttributes

      default AttributeTableView getAttributes(SubjectAttributes subjectAttributes)

      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 AttributeTableView instance in the correct format.
    • getAttributes

      default AttributeTableView getAttributes(Map<?,?> subjectMap)
      Retrieve attributes for the provided subject

      Convenience method to be used in the transformation procedure scripts.

      Parameters:
      subjectMap - Map containing the authenticated subject. Must contain a 'subject'.
      Returns:
      an AttributeTableView instance in the correct format.
      See Also:
    • getClaimValues

      default Attributes getClaimValues(Set<RequestedClaimAttribute> requestedClaimAttributes, Set<ScopeValue> scopeValues, AuthenticationAttributes userAuthenticationAttributes, OAuthClient client)
      Description copied from interface: ClaimsProvider
      Get the claim values for the requested claims, user and OAuth client. If no claims are available for the given inputs, return Attributes.empty()}.
      Specified by:
      getClaimValues in interface ClaimsProvider
      Parameters:
      requestedClaimAttributes - the attributes to retrieve for a set of claims
      scopeValues - the scopes related to the requested attributes
      userAuthenticationAttributes - user authentication attributes
      client - the OAuth client making the request
      Returns:
      attributes representing the claims names and values