public abstract class Token extends Object
Modifier | Constructor and Description |
---|---|
protected |
Token(Client client,
String tokenKey,
String tokenSecret,
long lifetime,
long issuedAt) |
Modifier and Type | Method and Description |
---|---|
Client |
getClient()
Returns the Client associated with this token
|
long |
getIssuedAt()
Returns the time (in seconds) when this token was issued at
|
long |
getLifetime()
Returns the number of seconds this token can be valid after it was issued
|
List<OAuthPermission> |
getScopes()
Returns a list of opaque permissions/scopes
|
UserSubject |
getSubject()
Returns a subject capturing the login name
the end user used to login to the resource server
when authorizing a given client request
|
String |
getTokenKey()
Returns the token key
|
String |
getTokenSecret()
Returns the token secret
|
boolean |
isPreAuthorized() |
void |
setPreAuthorized(boolean preAuthorized) |
void |
setScopes(List<OAuthPermission> scopes)
Sets a list of opaque permissions/scopes
|
void |
setSubject(UserSubject subject)
Sets a subject capturing the login name
the end user used to login to the resource server
when authorizing a given client request
|
public Client getClient()
public String getTokenKey()
public String getTokenSecret()
public long getIssuedAt()
public long getLifetime()
public List<OAuthPermission> getScopes()
public void setScopes(List<OAuthPermission> scopes)
scopes
- the scopespublic void setSubject(UserSubject subject)
subject
- public UserSubject getSubject()
public void setPreAuthorized(boolean preAuthorized)
public boolean isPreAuthorized()
Apache CXF