| Constructor and Description |
|---|
DefaultPrincipal(String principalId,
Set<Authorization> localAuthorizations,
Map<String,PrincipalAttribute> attributes) |
DefaultPrincipal(String principalId,
Set<Authorization> localAuthorizations,
Set<Authorization> allAuthorizations,
Set<Audience> audiences,
Map<String,PrincipalAttribute> attributes)
Creates a new
DefaultPrincipal. |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
io.vavr.control.Try<PrincipalAttribute> |
getAttribute(String attributeName)
Returns the attribute specified by the given name, wrapped in a
Try. |
Map<String,PrincipalAttribute> |
getAttributes() |
Set<Authorization> |
getAuthorizations()
The authorizations this Principal has.
|
Map<Audience,Set<Authorization>> |
getAuthorizationsByAudience()
The authorizations this Principal has grouped by audience.
|
Set<Authorization> |
getLocalAuthorizations() |
String |
getPrincipalId()
The identifier for this Principal.
|
int |
hashCode() |
void |
setAuthorizationsByAudience(Map<Audience,Set<Authorization>> authorizationsByAudience) |
String |
toString() |
@Beta public DefaultPrincipal(@Nonnull String principalId, @Nonnull Set<Authorization> localAuthorizations, @Nonnull Set<Authorization> allAuthorizations, @Nonnull Set<Audience> audiences, @Nonnull Map<String,PrincipalAttribute> attributes)
DefaultPrincipal.principalId - The ID of the principallocalAuthorizations - The local authorizations of the principalallAuthorizations - All authorizations of the principalaudiences - The audiences of the principalattributes - The attributes of the principalpublic DefaultPrincipal(@Nonnull String principalId, @Nonnull Set<Authorization> localAuthorizations, @Nonnull Map<String,PrincipalAttribute> attributes)
@Nonnull public Set<Authorization> getAuthorizations()
getAuthorizations in interface PrincipalSet with the authentications.@Nonnull public Map<Audience,Set<Authorization>> getAuthorizationsByAudience()
PrincipalgetAuthorizationsByAudience in interface PrincipalMap with the authentications grouped by audience.@Nonnull public io.vavr.control.Try<PrincipalAttribute> getAttribute(@Nonnull String attributeName)
Try.getAttribute in interface PrincipalattributeName - The name of the attribute to get.@Nonnull public Set<Authorization> getLocalAuthorizations()
@Nonnull public Map<String,PrincipalAttribute> getAttributes()
public void setAuthorizationsByAudience(@Nonnull Map<Audience,Set<Authorization>> authorizationsByAudience)
@Nonnull public String getPrincipalId()
getPrincipalId in interface PrincipalCopyright © 2021 SAP SE. All rights reserved.