Class IsAttributeRequiredPredicate
java.lang.Object
net.shibboleth.idp.consent.logic.impl.IsAttributeRequiredPredicate
- All Implemented Interfaces:
Predicate<IdPAttribute>
,Predicate<IdPAttribute>
public class IsAttributeRequiredPredicate extends Object implements Predicate<IdPAttribute>
Predicate that determines whether an IdP attribute is required by the requester.
-
Field Summary
Fields Modifier and Type Field Description private Function<SAMLMetadataContext,AttributeConsumingService>
acsLookupStrategy
Strategy used to find theAttributeConsumingService
from theSAMLMetadataContext
.private org.slf4j.Logger
log
Class logger.private Function<ProfileRequestContext,SAMLMetadataContext>
metadataContextLookupStrategy
Strategy used to find theSAMLMetadataContext
from theProfileRequestContext
.private Multimap<String,IdPAttribute>
requestedAttributesMap
Map of requested attributes. -
Constructor Summary
Constructors Constructor Description IsAttributeRequiredPredicate(javax.servlet.http.HttpServletRequest request)
Constructor. -
Method Summary
Modifier and Type Method Description protected ProfileRequestContext
getProfileRequestContext(javax.servlet.http.HttpServletRequest httpRequest)
Get the profile request context from the HTTP servlet request.protected Multimap<String,IdPAttribute>
getRequestedAttributes(ProfileRequestContext prc)
Get the map of requested attributes from the profile request context.boolean
test(IdPAttribute input)
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
metadataContextLookupStrategy
Strategy used to find theSAMLMetadataContext
from theProfileRequestContext
. -
acsLookupStrategy
Strategy used to find theAttributeConsumingService
from theSAMLMetadataContext
. -
requestedAttributesMap
Map of requested attributes.
-
-
Constructor Details
-
IsAttributeRequiredPredicate
public IsAttributeRequiredPredicate(@Nullable javax.servlet.http.HttpServletRequest request)Constructor.- Parameters:
request
- the HTTP request
-
-
Method Details
-
getProfileRequestContext
@Nullable protected ProfileRequestContext getProfileRequestContext(@Nullable javax.servlet.http.HttpServletRequest httpRequest)Get the profile request context from the HTTP servlet request.- Parameters:
httpRequest
- the HTTP request- Returns:
- the profile request context or
null
-
getRequestedAttributes
@Nullable protected Multimap<String,IdPAttribute> getRequestedAttributes(@Nullable ProfileRequestContext prc)Get the map of requested attributes from the profile request context.- Parameters:
prc
- the profile request context- Returns:
- the map of requested attributes or
null
-
test
- Specified by:
test
in interfacePredicate<IdPAttribute>
-