|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.ws.security.oauth.impl.OAuthProviderServiceImpl
public abstract class OAuthProviderServiceImpl
| Field Summary | |
|---|---|
protected HashMap<String,net.oauth.OAuthConsumer> |
consumers
Known consumers. |
protected static org.apache.commons.logging.Log |
LOG
Logger. |
protected HashSet<net.oauth.OAuthAccessor> |
tokens
User tokens. |
| Constructor Summary | |
|---|---|
OAuthProviderServiceImpl(org.exoplatform.container.xml.InitParams params)
Constructs instance of OAuthProviderService. |
|
| Method Summary | |
|---|---|
void |
authorize(net.oauth.OAuthAccessor accessor,
String userId)
|
void |
generateAccessToken(net.oauth.OAuthAccessor accessor)
Generate access token for given accessor and remove it from collection. |
void |
generateRequestToken(net.oauth.OAuthAccessor accessor)
Generate request token for given accessor and put it in collection. |
protected abstract String |
generateSecret()
Generate secret token. |
protected abstract String |
generateToken()
Generate token. |
net.oauth.OAuthAccessor |
getAccessor(net.oauth.OAuthMessage oauthMessage)
Look up accessor by given OAuthMessage. |
net.oauth.OAuthConsumer |
getConsumer(net.oauth.OAuthMessage oauthMessage)
|
net.oauth.OAuthConsumer |
getConsumer(String name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final HashMap<String,net.oauth.OAuthConsumer> consumers
protected final HashSet<net.oauth.OAuthAccessor> tokens
protected static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public OAuthProviderServiceImpl(org.exoplatform.container.xml.InitParams params)
params - the initialized parameters.| Method Detail |
|---|
public net.oauth.OAuthConsumer getConsumer(String name)
throws net.oauth.OAuthProblemException
getConsumer in interface OAuthProviderServicename - the consumer name.
net.oauth.OAuthProblemException - if consumer not found.
public net.oauth.OAuthAccessor getAccessor(net.oauth.OAuthMessage oauthMessage)
throws net.oauth.OAuthProblemException
getAccessor in interface OAuthProviderServiceoauthMessage - the message.
net.oauth.OAuthProblemException - if accessor not found.
public net.oauth.OAuthConsumer getConsumer(net.oauth.OAuthMessage oauthMessage)
throws net.oauth.OAuthProblemException
getConsumer in interface OAuthProviderServiceoauthMessage - the message.
net.oauth.OAuthProblemException - if consumer not found.
public void authorize(net.oauth.OAuthAccessor accessor,
String userId)
throws net.oauth.OAuthProblemException
authorize in interface OAuthProviderServiceaccessor - the accessor.userId - the user name or other identifier.
net.oauth.OAuthProblemException - if any error occurs.public void generateRequestToken(net.oauth.OAuthAccessor accessor)
generateRequestToken in interface OAuthProviderServiceaccessor - the accessor.
public void generateAccessToken(net.oauth.OAuthAccessor accessor)
throws net.oauth.OAuthProblemException
generateAccessToken in interface OAuthProviderServiceaccessor - the accessor.
net.oauth.OAuthProblemException - if access token can't be created.protected abstract String generateToken()
protected abstract String generateSecret()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||