| Constructor and Description |
|---|
O2Principal()
Create a new Principal with no authentication.
|
O2Principal(Client client)
Create a new principal from a authClient.
|
O2Principal(OAuthToken token)
Create a new principal from an OAuth token.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Assert equality between objects based on values.
|
Client |
getContext()
The client request context.
|
String |
getName()
Return the name of the current principal.
|
OAuthToken |
getOAuthToken()
Retrieve the OAuth token.
|
String |
getScheme()
Return the authentication scheme used for this principal.
|
int |
hashCode()
Generate a hash code for this entity.
|
boolean |
implies(Subject subject)
Implication assertion.
|
O2Principal |
merge(Principal newPrincipal)
Merge a new principal's values into this principal.
|
protected <T extends AbstractEntity> |
sameOrOne(T left,
T right)
Assert that only one entity is set, none, or that both are identical.
|
public O2Principal()
public O2Principal(Client client)
client - A authClient.public O2Principal(OAuthToken token)
token - The token to wrap.public OAuthToken getOAuthToken()
protected <T extends AbstractEntity> T sameOrOne(T left, T right)
T - Raw type of abstract entity, used to determine return type.left - A left entity.right - A right entity.RFC6749.AccessDeniedException - If both are set.public String getName()
public boolean implies(Subject subject)
public String getScheme()
public Client getContext()
public O2Principal merge(Principal newPrincipal)
newPrincipal - The new principal values to merge into the
existing one.public boolean equals(Object o)
Copyright © 2018 krotscheck.net. All rights reserved.