public interface OAuth2Cache
OAuth2Store to cache OAuth2 data.
Default implementation is in-memory HashMaps for shindig.| Modifier and Type | Method and Description |
|---|---|
void |
clearAccessors()
Clears all cached
OAuth2Clients. |
void |
clearClients()
Clears all cached
OAuth2Clients. |
void |
clearTokens()
Clears all cached
OAuth2Tokens. |
OAuth2Client |
getClient(String gadgetUri,
String serviceName)
Find an
OAuth2Client. |
OAuth2Accessor |
getOAuth2Accessor(OAuth2CallbackState state)
Find an
OAuth2Accessor by state. |
OAuth2Token |
getToken(String gadgetUri,
String serviceName,
String user,
String scope,
OAuth2Token.Type type)
Find an
OAuth2Token based on index |
boolean |
isPrimed() |
OAuth2Client |
removeClient(OAuth2Client client)
Remove the given client;
|
OAuth2Accessor |
removeOAuth2Accessor(OAuth2Accessor accessor)
Remove the given accessor.
|
OAuth2Token |
removeToken(OAuth2Token token)
Remove the given token;
|
void |
storeClient(OAuth2Client client)
Stores the given client.
|
void |
storeClients(Collection<OAuth2Client> clients)
Store all clients in the collection.
|
void |
storeOAuth2Accessor(OAuth2Accessor accessor)
Stores the given accessor.
|
void |
storeToken(OAuth2Token token)
Stores the given token.
|
void |
storeTokens(Collection<OAuth2Token> tokens)
Stores all tokens in the collection.
|
void clearAccessors()
throws OAuth2CacheException
OAuth2Clients.OAuth2CacheExceptionvoid clearClients()
throws OAuth2CacheException
OAuth2Clients.OAuth2CacheExceptionvoid clearTokens()
throws OAuth2CacheException
OAuth2Tokens.OAuth2CacheExceptionOAuth2Client getClient(String gadgetUri, String serviceName)
OAuth2Client.gadgetUri - serviceName - OAuth2Accessor getOAuth2Accessor(OAuth2CallbackState state)
OAuth2Accessor by state.state - OAuth2Token getToken(String gadgetUri, String serviceName, String user, String scope, OAuth2Token.Type type)
OAuth2Token based on indexgadgetUri - serviceName - user - scope - type - boolean isPrimed()
OAuth2Client removeClient(OAuth2Client client)
client - null if removal failedOAuth2Accessor removeOAuth2Accessor(OAuth2Accessor accessor)
accessor - null if removal failedOAuth2Token removeToken(OAuth2Token token)
token - null if removal failedvoid storeClient(OAuth2Client client) throws OAuth2CacheException
index - client - OAuth2CacheExceptionvoid storeClients(Collection<OAuth2Client> clients) throws OAuth2CacheException
clients - OAuth2CacheExceptionvoid storeOAuth2Accessor(OAuth2Accessor accessor)
accessor - void storeToken(OAuth2Token token) throws OAuth2CacheException
OAuth2CacheExceptionvoid storeTokens(Collection<OAuth2Token> tokens) throws OAuth2CacheException
tokens - OAuth2CacheExceptionCopyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.