|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.brickred.socialauth.SocialAuthManager
public class SocialAuthManager
This class manages the Map of all the connected providers by using this manager.
| Constructor Summary | |
|---|---|
SocialAuthManager()
|
|
| Method Summary | |
|---|---|
AuthProvider |
connect(AccessGrant accessGrant)
Creates the provider with given access grant |
AuthProvider |
connect(Map<String,String> requestParams)
Verifies the user when the external provider redirects back to our application. |
boolean |
disconnectProvider(String id)
It disconnects with provider |
String |
getAuthenticationUrl(String id,
String successUrl)
This is the most important action. |
String |
getAuthenticationUrl(String id,
String successUrl,
Permission permission)
This is the most important action. |
List<String> |
getConnectedProvidersIds()
Returns the array list of connected providers ids. |
AuthProvider |
getCurrentAuthProvider()
Retrieves the current auth provider instance which is last connected. |
AuthProvider |
getProvider(String providerId)
Retrieves the instance of given provider |
SocialAuthConfig |
getSocialAuthConfig()
Retrieves the socialauth config |
boolean |
isConnected(String providerId)
Returns True if given provider is connected otherwise returns False |
void |
setPermission(String providerId,
Permission permission)
Sets the permission for given provider. |
void |
setSocialAuthConfig(SocialAuthConfig socialAuthConfig)
Updates the socialauth config |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocialAuthManager()
| Method Detail |
|---|
public SocialAuthConfig getSocialAuthConfig()
public void setSocialAuthConfig(SocialAuthConfig socialAuthConfig)
throws Exception
socialAuthConfig - the SocialAuthConfig object which contains the configuration
for providers
Exception
public String getAuthenticationUrl(String id,
String successUrl)
throws Exception
id - the provider idsuccessUrl - success page URL on which provider will redirect after
authentication
Exception
public String getAuthenticationUrl(String id,
String successUrl,
Permission permission)
throws Exception
id - the provider idsuccessUrl - success page URL on which provider will redirect after
authenticationpermission - Permission object which can be Permission.AUHTHENTICATE_ONLY,
Permission.ALL, Permission.DEFAULT
Exception
public AuthProvider connect(Map<String,String> requestParams)
throws Exception
requestParams - the request parameters
Exceptionpublic boolean disconnectProvider(String id)
id - the provider id
public AuthProvider connect(AccessGrant accessGrant)
throws Exception
accessGrant - the access grant object which contains
Exceptionpublic boolean isConnected(String providerId)
providerId - the provider id
public AuthProvider getProvider(String providerId)
providerId - the provider id
public List<String> getConnectedProvidersIds()
public AuthProvider getCurrentAuthProvider()
public void setPermission(String providerId,
Permission permission)
providerId - the provider id for which permission need to be setpermission - Permission object which can be Permission.AUHTHENTICATE_ONLY,
Permission.ALL, Permission.DEFAULT
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||