public class ScpNeoPrincipal extends DefaultPrincipal
Principal
for SAP Cloud Platform Neo.Modifier and Type | Field and Description |
---|---|
static String |
EMAIL
Attribute key for email.
|
static String |
FIRST_NAME
Attribute key for first name.
|
static String |
LAST_NAME
Attribute key for last name.
|
Constructor and Description |
---|
ScpNeoPrincipal()
Creates a mocked
ScpNeoPrincipal returning an empty user name and no authorizations. |
ScpNeoPrincipal(com.sap.security.um.user.User delegate)
Creates a new
ScpNeoPrincipal . |
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 . |
Set<Authorization> |
getAuthorizations()
The authorizations this Principal has.
|
com.sap.security.um.user.User |
getDelegate()
Delegate to the current
User . |
int |
hashCode() |
String |
toString() |
getAttributes, getPrincipalId
public static final String FIRST_NAME
public static final String LAST_NAME
public static final String EMAIL
public ScpNeoPrincipal(@Nonnull com.sap.security.um.user.User delegate)
ScpNeoPrincipal
.delegate
- The user to delegate to.public ScpNeoPrincipal()
ScpNeoPrincipal
returning an empty user name and no authorizations.@Nonnull public Set<Authorization> getAuthorizations()
getAuthorizations
in interface Principal
getAuthorizations
in class DefaultPrincipal
Set
with the authentications.@Nonnull public io.vavr.control.Try<PrincipalAttribute> getAttribute(@Nonnull String attributeName)
Try
.getAttribute
in interface Principal
getAttribute
in class DefaultPrincipal
attributeName
- The name of the attribute to get.public boolean equals(@Nullable Object o)
equals
in class DefaultPrincipal
protected boolean canEqual(@Nullable Object other)
canEqual
in class DefaultPrincipal
public int hashCode()
hashCode
in class DefaultPrincipal
@Nonnull public String toString()
toString
in class DefaultPrincipal
@Nonnull public com.sap.security.um.user.User getDelegate()
User
.Copyright © 2020 SAP SE. All rights reserved.