|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.ext.oauth.AuthenticatedUser
public abstract class AuthenticatedUser
POJO for keeping a grant that a user has approved. User with a specific id has granted a set of scopes. Implementors should implement the storage and retrieval.
Constructor Summary | |
---|---|
AuthenticatedUser()
|
Method Summary | |
---|---|
abstract void |
addRole(Role r,
String owner)
Adds a scope for this user given a specified owner. |
abstract void |
clearCode()
Removes a generated code that was used or revoked. |
abstract Client |
getClient()
Gets the client object that associated and created this user. |
abstract String |
getCode()
Returns the current oauth code if any available for exchange for a token. |
abstract List<Role> |
getGrantedRoles()
Gets all scopes. |
abstract String |
getId()
Returns the identifier of the user. |
abstract String |
getPassword()
Password field for the username and password oauth flow. |
abstract org.restlet.ext.oauth.internal.Token |
getToken()
Returns the currently issued token for this user. |
abstract long |
getTokenExpire()
Returns the default token expire time for this user. |
abstract boolean |
isGrantedRole(Role role,
String owner)
Checks if this user has a specific scope. |
boolean |
persist()
Helper method to indicate when to checkpoint the user data. |
abstract void |
revokeRole(Role role,
String owner)
Removes a specific scope. |
abstract void |
revokeRoles()
Revokes previously granted scopes. |
abstract void |
setCode(String code)
Sets a generated code that was given out for this user. |
abstract void |
setPassword(String password)
Sets the user password |
abstract void |
setToken(org.restlet.ext.oauth.internal.Token token)
Sets the current issued token. |
abstract void |
setTokenExpire(long deltaTimeSec)
Sets the time for all token expire time for this user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthenticatedUser()
Method Detail |
---|
public abstract void addRole(Role r, String owner)
public abstract void clearCode()
public abstract Client getClient()
public abstract String getCode()
public abstract List<Role> getGrantedRoles()
public abstract String getId()
public abstract String getPassword()
public abstract org.restlet.ext.oauth.internal.Token getToken()
public abstract long getTokenExpire()
public abstract boolean isGrantedRole(Role role, String owner)
role
- The scope to check.owner
- The owner.
public boolean persist()
public abstract void revokeRole(Role role, String owner)
role
- The scope to be removed.owner
- The scope owner.public abstract void revokeRoles()
public abstract void setCode(String code)
code
- The generated code.public abstract void setPassword(String password)
password
- The user password.public abstract void setToken(org.restlet.ext.oauth.internal.Token token)
token
- The current issued token.public abstract void setTokenExpire(long deltaTimeSec)
deltaTimeSec
- The time for all token expire time for this user.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |