Interface IdmQueryService
- All Known Subinterfaces:
IdmService
public interface IdmQueryService
Interface for querying an IDM service (e.g. via LDAP).
An implementation can be configured via Spring @Value binding or by injecting swiss.trustbroker.config.TrustbrokerProperties and using swiss.trustbroker.config.dto.IdmConfig (${trustbroker.config.idm}).
Breaking changes:
An implementation can be configured via Spring @Value binding or by injecting swiss.trustbroker.config.TrustbrokerProperties and using swiss.trustbroker.config.dto.IdmConfig (${trustbroker.config.idm}).
Breaking changes:
- With 1.8.0 getAttributesFromIdm renamed to getAttributes.
- With 1.15.0 getAttributes and getAttributesAudited were changed to a single
IdmRequestas input and state was added for implementations that need state across requests.
-
Method Summary
Modifier and TypeMethodDescriptionbooleangetAttributes(RelyingPartyConfig relyingPartyConfig, CpResponseData cpResponse, IdmRequest idmRequest, IdmStatusPolicyCallback statusPolicyCallback, Map<String, Object> state, IdmResult result) default booleangetAttributesAudited(RelyingPartyConfig relyingPartyConfig, CpResponseData cpResponse, IdmRequest idmRequest, IdmStatusPolicyCallback statusPolicyCallback, Map<String, Object> state, IdmResult result) Implements getAttributes as well but signals, that the IDM data is fetched based on a federated login for the first time and therefore might need additional auditing (write operations on an otherwise read-only access).getClientExtId(IdmRequests idmRequests) default booleanhasQueryOfStore(String requestedStore, IdmRequests idmRequests, String defaultStore) default booleanisQueryOfStore(String requestedStore, IdmRequest idmQuery, String defaultStore) default boolean
-
Method Details
-
getAttributes
boolean getAttributes(RelyingPartyConfig relyingPartyConfig, CpResponseData cpResponse, IdmRequest idmRequest, IdmStatusPolicyCallback statusPolicyCallback, Map<String, Object> state, IdmResult result) - Parameters:
relyingPartyConfig- Data from the request (not null)cpResponse- Data from the CP response (not null)idmRequest- Defines the request to be performed by this call to query the IDM.
The request is for this service.statusPolicyCallback- callback for status policy enforcementstate- State that can be used by this service across a set of related requests.result- Update with this query's result. Changing exising results is allowed.- Returns:
- true if the query was processed, false otherwise
- Since:
- 1.8.0
-
getAttributesAudited
default boolean getAttributesAudited(RelyingPartyConfig relyingPartyConfig, CpResponseData cpResponse, IdmRequest idmRequest, IdmStatusPolicyCallback statusPolicyCallback, Map<String, Object> state, IdmResult result) Implements getAttributes as well but signals, that the IDM data is fetched based on a federated login for the first time and therefore might need additional auditing (write operations on an otherwise read-only access).- Since:
- 1.8.0
-
getClientExtId
- Parameters:
idmRequests- Defines the requests to be performed by the call to query the IDM.- Returns:
- Client external ID if defined in
IdmRequestsand relevant for this service.
-
hasQueryOfStore
default boolean hasQueryOfStore(String requestedStore, IdmRequests idmRequests, String defaultStore) - Parameters:
requestedStore- Defines the store requesting this checkidmRequests- Defines the requests to be performed by this call to query the store.defaultStore- Default store of the application- Returns:
- boolean whether those requests are interesting for this store.
-
isQueryOfStore
- Parameters:
requestedStore- Defines the store requesting this checkidmQuery- Defines the request to be performed by this call to query the store.defaultStore- Default store of the application- Returns:
- boolean whether this particular request is interesting for this store.
-
getServiceDefaultOrder
Integer getServiceDefaultOrder()- Returns:
- the default order used by the service to determine the
IdmRequest> order when no explicit order is set - Since:
- 1.15.0
-
getStoreName
String getStoreName()- Returns:
- the
IdmStorename use to assign the correctIdmServiceto theIdmRequest - Since:
- 1.15.0
-
sortQueriesByName
default boolean sortQueriesByName()- Returns:
- true if the
IdmRequestshould be sorted by name when no explicit order is provided.
Default: false - Since:
- 1.15.0
-