@Entity @Indexed(index="oauth_tokens") @Analyzer(definition="entity_analyzer") public final class OAuthToken extends AbstractAuthzEntity implements Principal
| Modifier and Type | Class and Description |
|---|---|
static class |
OAuthToken.Deserializer
Deserialize a reference to an OAuthToken.
|
| Constructor and Description |
|---|
OAuthToken() |
| Modifier and Type | Method and Description |
|---|---|
OAuthToken |
getAuthToken()
Retrieve the oauth token for this refresh token.
|
Client |
getClient()
Retrieve the client for whom this token is valid.
|
Long |
getExpiresIn()
Get the token lifetime, in seconds.
|
HttpSession |
getHttpSession()
Get the attached HTTP Session.
|
UserIdentity |
getIdentity()
Get the user identity to which this token was issued.
|
String |
getIssuer()
Get the issuer.
|
String |
getName()
Returns the name of this principal.
|
User |
getOwner()
The owner of this entity.
|
URI |
getRedirect()
Get the redirect attached to this token.
|
SortedMap<String,ApplicationScope> |
getScopes()
Get this token's scopes.
|
OAuthTokenType |
getTokenType()
Get the token type.
|
boolean |
isExpired()
This method returns true if the created time, plus the expiration
seconds, is less than the current time.
|
void |
setAuthToken(OAuthToken authToken)
Set the new parent auth token (for refresh tokens only).
|
void |
setClient(Client client)
Set the client for whom this token is valid.
|
void |
setExpiresIn(int expiresIn)
Set the expiration time, in seconds, from the creation date.
|
void |
setExpiresIn(long expiresIn)
Set the expiration time, in seconds, from the creation date.
|
void |
setExpiresIn(Number expiresIn)
Set the expiration time, in seconds, from the creation date.
|
void |
setHttpSession(HttpSession httpSession)
Set the attached HTTP Session.
|
void |
setIdentity(UserIdentity identity)
Set the user identity to whom this token was issued.
|
void |
setIssuer(String issuer)
Set the URL of the server that issued this token.
|
void |
setRedirect(URI redirect)
Set the redirect for this particular token.
|
void |
setScopes(SortedMap<String,ApplicationScope> scopes)
Set this token's scopes.
|
void |
setTokenType(OAuthTokenType tokenType)
Set the token type.
|
clone, equals, getCreatedDate, getId, getModifiedDate, hashCode, setCreatedDate, setId, setModifiedDate, toStringpublic String getIssuer()
public void setIssuer(String issuer)
issuer - The new issuer.public HttpSession getHttpSession()
public void setHttpSession(HttpSession httpSession)
httpSession - The http session.public UserIdentity getIdentity()
public void setIdentity(UserIdentity identity)
identity - The identity.public Client getClient()
public void setClient(Client client)
client - The client.public OAuthToken getAuthToken()
public void setAuthToken(OAuthToken authToken)
authToken - The new auth token.public OAuthTokenType getTokenType()
public void setTokenType(OAuthTokenType tokenType)
tokenType - The token type.public Long getExpiresIn()
public void setExpiresIn(int expiresIn)
expiresIn - The time, in seconds.public void setExpiresIn(long expiresIn)
expiresIn - The time, in seconds.public void setExpiresIn(Number expiresIn)
expiresIn - The time, in seconds.public SortedMap<String,ApplicationScope> getScopes()
public void setScopes(SortedMap<String,ApplicationScope> scopes)
scopes - A new map of scopes.public boolean isExpired()
public URI getRedirect()
public void setRedirect(URI redirect)
redirect - The new redirect.public String getName()
public User getOwner()
getOwner in class AbstractAuthzEntityCopyright © 2018 krotscheck.net. All rights reserved.