public interface OAuthLifeCycleService extends Serializable
OAuthSession
collections for a given .UserSessionRepository
Modifier and Type | Method and Description |
---|---|
OAuthSession |
buildSessionFor(Annotation qualifier)
Build a new OAuth Session for the given provider qualifier and set it as current
|
OAuthSession |
buildSessionFor(String providerName)
Build a new OAuth Session for the given provider name and set it as current
|
void |
endDance()
OAuth dance exit point.
|
void |
endDance(String verifier)
OAuth dance exit point.
|
List<OAuthSession> |
getAllActiveSessions() |
OAuthService |
getCurrentService() |
OAuthSession |
getCurrentSession() |
UserProfileService |
getCurrentUserProfileService() |
String |
getVerifierParamName()
return the name of the parameter for the verifier (OAuth 1.0a) or code (OAuth 2.0) returned by the provider in the
callback
|
void |
killCurrentSession()
kill (disconnect and garbage) the current session
|
void |
killSession(OAuthSession session)
kill (disconnect and garbage) the given session
|
OAuthSession |
resolveSessionForQualifier(Annotation qualifier)
Resolve session for the given qualifier.
|
void |
setCurrentSession(OAuthSession session)
Makes the given OAuth session the current session
|
String |
startDanceFor(Annotation provider)
OAuth dance entry point.
|
String |
startDanceFor(String providerName)
OAuth Dance entry point.
|
String |
startDanceFor(String providerName,
String internalCallBack)
OAuth Dance entry point.
|
OAuthService getCurrentService()
OAuthSession getCurrentSession()
void killCurrentSession()
void killSession(OAuthSession session)
session
- to killUserProfileService getCurrentUserProfileService()
String startDanceFor(String providerName)
providerName
- name of the service provider to connect toString startDanceFor(String providerName, String internalCallBack)
providerName
- name of the service provider to connect tointernalCallBack
- the internal URL to go back to after ending the danceString startDanceFor(Annotation provider)
ProviderRelated
qualifier,
initializes OAuth workflow by returning authorization url end user should connect to in order to grant permission to
the OAuth application to use her account or her behalfprovider
- qualifier with ProviderRelated
meta annotationvoid endDance(String verifier)
verifier
- the verifier or code value returned in callback by provider service to validate finalvoid endDance()
OAuthSession buildSessionFor(String providerName)
providerName
- name of the provider to build the session forOAuthSession buildSessionFor(Annotation qualifier)
qualifier
- qualifier of the provider to build the session forOAuthSession resolveSessionForQualifier(Annotation qualifier) throws ProviderMismatchException
qualifier
- provider ProviderRelated
qualifierProviderMismatchException
- if current session is not NULL and its qualifier is different than the one providedString getVerifierParamName()
List<OAuthSession> getAllActiveSessions()
UserSessionRepository
void setCurrentSession(OAuthSession session)
session
- to put as current sessionCopyright © 2012-2013. All Rights Reserved.