Class ClaimsMapperService
java.lang.Object
swiss.trustbroker.mapping.service.ClaimsMapperService
Service for mapping claims (attributes, user details, properties).
-
Constructor Summary
ConstructorsConstructorDescriptionClaimsMapperService(RelyingPartySetupService relyingPartySetupService, ScriptService scriptService, TrustBrokerProperties trustBrokerProperties) -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<Definition, List<String>> applyConstantDefinitionValues(RelyingParty relyingParty) voidapplyFinalAttributeMapping(CpResponse cpResponse, ResponseParameters responseParameters, String destination, RelyingParty relyingParty) Perform mapping of collected attributes before outputting them to the caller: - apply filter by config - apply Definition mappers - apply deduplicationvoidapplyIdmDeduplication(CpResponse cpResponse) Drop duplicate attributes coming from CP and IDM having the same value with a CP preference.applyMappers(Definition definition, List<T> values, String typeDescription) Apply the mappers of a Definition.voidapplyProfileSelection(CpResponse cpResponse, swiss.trustbroker.api.profileselection.dto.ProfileSelectionResult psResult) Apply profile selection result.static Map<Definition, List<String>> deduplicatedCpAttributes(CpResponse cpResponse, List<String> dropDuplicatedAttributes, ConstAttributes constAttributes) deduplicatedRpAttributes(Map<Definition, List<String>> userDetailMap, Map<Definition, List<String>> properties, ConstAttributes constAttributes) static Map<Definition, List<String>> filterAndCreateCpDefinitions(Map<Definition, List<String>> attributes, Collection<Definition> confAttributes, AttributesSelection claimsSelection, String issuer)
-
Constructor Details
-
ClaimsMapperService
public ClaimsMapperService(RelyingPartySetupService relyingPartySetupService, ScriptService scriptService, TrustBrokerProperties trustBrokerProperties)
-
-
Method Details
-
applyFinalAttributeMapping
public void applyFinalAttributeMapping(CpResponse cpResponse, ResponseParameters responseParameters, String destination, RelyingParty relyingParty) Perform mapping of collected attributes before outputting them to the caller: - apply filter by config - apply Definition mappers - apply deduplication -
applyConstantDefinitionValues
-
filterAndCreateCpDefinitions
public static Map<Definition,List<String>> filterAndCreateCpDefinitions(Map<Definition, List<String>> attributes, Collection<Definition> confAttributes, AttributesSelection claimsSelection, String issuer) -
applyMappers
Apply the mappers of a Definition. -
applyIdmDeduplication
Drop duplicate attributes coming from CP and IDM having the same value with a CP preference. This is needed to pass-through data to AccessRequestService with a preference for the IDP. -
applyProfileSelection
public void applyProfileSelection(CpResponse cpResponse, swiss.trustbroker.api.profileselection.dto.ProfileSelectionResult psResult) Apply profile selection result. -
deduplicatedRpAttributes
public Map<Definition,List<String>> deduplicatedRpAttributes(Map<Definition, List<String>> userDetailMap, Map<Definition, List<String>> properties, ConstAttributes constAttributes) -
deduplicatedCpAttributes
public static Map<Definition,List<String>> deduplicatedCpAttributes(CpResponse cpResponse, List<String> dropDuplicatedAttributes, ConstAttributes constAttributes)
-