@ThreadSafe public final class ConsentHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
ConsentHelper.SortedAttributeSet
A sorted set of attributes.
|
| Modifier and Type | Field and Description |
|---|---|
private static Logger |
LOGGER
Class logger.
|
| Modifier | Constructor and Description |
|---|---|
private |
ConsentHelper()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
findUserId(String userIdAttribute,
Collection<net.shibboleth.idp.attribute.IdPAttribute> releasedAttributes)
Searches the user identification attribute in the collection of released attributes and returns its value as user
id.
|
static ConsentContext |
getConsentContext(HttpServletRequest request)
Gets the consent context from the HTTP request.
|
static String |
getRelyingParty(ConsentContext context)
Retrieves the entityId of the relying party.
|
static HttpServletRequest |
getRequest(ConsentContext consentContext)
Gets the HTTP request from the consent context.
|
static HttpServletResponse |
getResponse(ConsentContext consentContext)
Gets the HTTP response from the consent context.
|
static String |
hashAttributeValues(net.shibboleth.idp.attribute.IdPAttribute attribute)
Hashes the values of a given @see Attribute.
|
static boolean |
isConsentRevocationRequested(ConsentContext consentContext)
Checks if consent revocation is requested.
|
static Collection<net.shibboleth.idp.attribute.IdPAttribute> |
removeBlacklistedAttributes(Collection<String> blacklist,
Collection<net.shibboleth.idp.attribute.IdPAttribute> allAttributes)
Removes blacklisted attributes from the attributes which will be released.
|
static boolean |
skipRelyingParty(Collection<String> list,
boolean isBlacklist,
String relyingPartyId)
Checks if user consent for a specific relying party should be skipped.
|
static SortedSet<net.shibboleth.idp.attribute.IdPAttribute> |
sortAttributes(List<String> sortOrder,
Collection<net.shibboleth.idp.attribute.IdPAttribute> releasedAttributes)
Sorts the released attributes according the specified sort order.
|
private static final Logger LOGGER
public static String getRelyingParty(ConsentContext context)
context - The current terms of use context.public static boolean isConsentRevocationRequested(ConsentContext consentContext)
consentContext - The @see ConsentContext.public static String hashAttributeValues(net.shibboleth.idp.attribute.IdPAttribute attribute)
attribute - The @see Attribute.public static final String findUserId(String userIdAttribute, Collection<net.shibboleth.idp.attribute.IdPAttribute> releasedAttributes)
userIdAttribute - The id of the attribute which is used as user identification.releasedAttributes - The collection of released attributes.public static boolean skipRelyingParty(Collection<String> list, boolean isBlacklist, String relyingPartyId)
list - The collection of relying party ids.isBlacklist - Indicates whether the list is a blacklist or not (whitelist).relyingPartyId - the relying party id.public static Collection<net.shibboleth.idp.attribute.IdPAttribute> removeBlacklistedAttributes(Collection<String> blacklist, Collection<net.shibboleth.idp.attribute.IdPAttribute> allAttributes)
blacklist - A collection of attribute ids which are blacklistedallAttributes - A collection of attributes which will be released.public static SortedSet<net.shibboleth.idp.attribute.IdPAttribute> sortAttributes(List<String> sortOrder, Collection<net.shibboleth.idp.attribute.IdPAttribute> releasedAttributes)
sortOrder - A list of attribute ids which specifies the sort order.releasedAttributes - A collection of attributes which will be released.public static ConsentContext getConsentContext(HttpServletRequest request)
request - The HTTP requestpublic static HttpServletRequest getRequest(ConsentContext consentContext)
consentContext - The consent context.public static HttpServletResponse getResponse(ConsentContext consentContext)
consentContext - The consent context.Copyright © 1999–2014. All rights reserved.