|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.ext.oauth.ClientStore<G>
public abstract class ClientStore<G extends org.restlet.ext.oauth.internal.TokenGenerator>
Abstract class that defines a client store for the Authentication Server. The following code adds a client to a store when you create your inbound root
{ @code public synchronized Restlet createInboundRoot(){ ClientStore clientStore = ClientStoreFactory.getInstance(); clientStore.createClient("1234567890","1234567890", "http://localhost:8080"); attribs.put(ClientStore.class.getCanonicalName(), clientStore); } }
Constructor Summary | |
---|---|
protected |
ClientStore(G generator)
Constructor. |
Method Summary | |
---|---|
abstract Client |
createClient(String clientId,
String redirectUri)
Useful only for clients using the user agent oauth flow where secret is never used |
abstract Client |
createClient(String clientId,
String clientSecret,
String redirectUri)
Used for creating a data entry representation for a oauth client |
abstract void |
deleteClient(String id)
Delete a client_id from the implementing backed database. |
abstract Client |
findById(String id)
Search for a client_id if present in the database. |
abstract Collection<? extends Client> |
findClientsForUser(String userid)
Function to find all granted client for a specific authenticated use. |
G |
getTokenGenerator()
Returns the token generator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ClientStore(G generator)
generator
- The token generator.Method Detail |
---|
public abstract Client createClient(String clientId, String redirectUri)
clientId
- oauth client_id entry for a new clientredirectUri
- the URL that should be used for oauth callbacks
public abstract Client createClient(String clientId, String clientSecret, String redirectUri)
clientId
- oauth client_id entry for a new clientclientSecret
- oauth client_secret entry for a new clientredirectUri
- the URL that should be used for oauth callbacks
public abstract void deleteClient(String id)
id
- client_id of the client to removepublic abstract Client findById(String id)
id
- client_id to search for.
public abstract Collection<? extends Client> findClientsForUser(String userid)
userid
- id of the user to retrieve. (openid)
public G getTokenGenerator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |