@NotThreadSafe public class User extends Object
| Modifier and Type | Field and Description |
|---|---|
private boolean |
globalConsent
Whether the user has given global consent or not.
|
private String |
id
The users id.
|
private Map<String,Collection<AttributeRelease>> |
releases
A map of attribute releases.
|
| Constructor and Description |
|---|
User(String userId,
boolean globalConsentGiven)
Constructs a @see User.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<AttributeRelease> |
getAttributeReleases(String relyingPartyId)
Gets the attribute releases for a specific relying party.
|
String |
getId()
Gets the userId.
|
boolean |
hasApprovedAttributes(String relyingPartyId,
Collection<net.shibboleth.idp.attribute.IdPAttribute> attributes)
Checks if the user has given (in past) attribute release consent to all released attributes.
|
boolean |
hasGlobalConsent()
Gets the global consent flag.
|
void |
setAttributeReleases(String relyingPartyId,
Collection<AttributeRelease> attributeReleases)
Sets the attribute releases for a specific relying party.
|
void |
setGlobalConsent(boolean globalConsentGiven)
Sets the global consent flag.
|
String |
toString() |
private final String id
private boolean globalConsent
private final Map<String,Collection<AttributeRelease>> releases
public User(String userId, boolean globalConsentGiven)
userId - The id of the user.globalConsentGiven - If user has given global consent or not.public boolean hasGlobalConsent()
public void setGlobalConsent(boolean globalConsentGiven)
globalConsentGiven - The global consent flag to set.public String getId()
public void setAttributeReleases(String relyingPartyId, Collection<AttributeRelease> attributeReleases)
relyingPartyId - The id of the relying party for which the attribute releases should be setattributeReleases - Collection of @see AttributeRelease to setpublic Collection<AttributeRelease> getAttributeReleases(String relyingPartyId)
relyingPartyId - The id of the relying party for which the attribute releases should be returnedpublic boolean hasApprovedAttributes(String relyingPartyId, Collection<net.shibboleth.idp.attribute.IdPAttribute> attributes)
relyingPartyId - The id of the relying party for which the attribute releases should be checkedattributes - Collection of @see Attribute, the attributes which are going to be releasedCopyright © 1999–2014. All rights reserved.