|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.resource.Resource
org.restlet.resource.UniformResource
org.restlet.resource.ServerResource
org.restlet.ext.oauth.OAuthServerResource
public abstract class OAuthServerResource
Base class for common resources used by the OAuth server side.
Field Summary | |
---|---|
static String |
ACCESS_TOKEN
|
static String |
ASSERTION
|
static String |
ASSERTION_TYPE
|
static String |
AUTONOMOUS_USER
|
static String |
CLIENT_ID
|
static String |
CLIENT_SECRET
|
static String |
ClientCookieID
|
protected ClientStore<?> |
clients
|
static String |
CODE
|
static String |
ERROR
|
static String |
ERROR_DESC
|
static String |
ERROR_URI
|
static String |
EXPIRES_IN
|
protected org.restlet.ext.oauth.internal.TokenGenerator |
generator
|
static String |
GRANT_TYPE
|
protected static List<CacheDirective> |
noCache
|
protected static List<CacheDirective> |
noStore
|
static String |
OAUTH_TOKEN
|
static String |
PASSWORD
|
static String |
REDIR_URI
|
static String |
REFRESH_TOKEN
|
static String |
RESPONSE_TYPE
MandatoryClient Request Authorization parameters. |
static String |
SCOPE
|
static String |
STATE
|
static String |
TOKEN_SERVER_MAX_TIME_SEC
|
static String |
TOKEN_SERVER_TIME_SEC
|
protected long |
tokenMaxTimeSec
|
protected long |
tokenTimeSec
|
static String |
USERNAME
|
Constructor Summary | |
---|---|
OAuthServerResource()
Default constructor. |
Method Summary | |
---|---|
protected void |
doInit()
|
protected String |
generateAgentToken(String userId,
Client client,
String redirURL)
Returns the agent token for the given user, client and redirection URI. |
protected String |
generateCode(String userId,
Client client,
String redirURL)
Returns the code for the given user, client and redirection URI. |
protected String |
getParameter(String parameter,
String defaultValue)
Returns the value of the first parameter found with the given name. |
protected String[] |
parseScope(String scopes)
Parses a " " separated list of scopes into an array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ACCESS_TOKEN
public static final String ASSERTION
public static final String ASSERTION_TYPE
public static final String AUTONOMOUS_USER
public static final String CLIENT_ID
public static final String CLIENT_SECRET
public static final String ClientCookieID
public static final String CODE
public static final String ERROR
public static final String ERROR_DESC
public static final String ERROR_URI
public static final String EXPIRES_IN
public static final String GRANT_TYPE
protected static final List<CacheDirective> noCache
protected static final List<CacheDirective> noStore
public static final String OAUTH_TOKEN
public static final String PASSWORD
public static final String REDIR_URI
public static final String REFRESH_TOKEN
public static final String RESPONSE_TYPE
public static final String SCOPE
public static final String STATE
public static final String TOKEN_SERVER_MAX_TIME_SEC
public static final String TOKEN_SERVER_TIME_SEC
public static final String USERNAME
protected volatile ClientStore<?> clients
protected volatile org.restlet.ext.oauth.internal.TokenGenerator generator
protected volatile long tokenMaxTimeSec
protected volatile long tokenTimeSec
Constructor Detail |
---|
public OAuthServerResource()
Method Detail |
---|
protected void doInit() throws ResourceException
doInit
in class Resource
ResourceException
protected String generateAgentToken(String userId, Client client, String redirURL)
userId
- The identifier of the user.client
- The oAuth client.redirURL
- The redirection URI.
protected String generateCode(String userId, Client client, String redirURL)
userId
- The identifier of the user.client
- The oAuth client.redirURL
- The redirection URI.
protected String getParameter(String parameter, String defaultValue)
parameter
- The parameter name.defaultValue
- The default value to return if no matching parameter found or
if the parameter has a null value.
protected String[] parseScope(String scopes)
scopes
- The " " separated list of scopes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |