|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.brickred.socialauth.cdi.SocialAuth
@Named(value="socialauth") @SessionScoped public class SocialAuth
This is a CDI component that allows us to delegate authentication to OpenID / oAuth providers like Facebook, Twitter, Google, Yahoo. Apart from authentication, it also allows us to obtain various details of the user, update status. This can be inject this component into Seam/CDI beans or used directly. Please note that : @Name("socialauth")
| Constructor Summary | |
|---|---|
SocialAuth()
|
|
| Method Summary | |
|---|---|
void |
connect()
Verifies the user when the external provider redirects back to our application |
List<org.brickred.socialauth.Contact> |
getContactList()
Gets the list of contacts available from the provider. |
String |
getId()
|
org.brickred.socialauth.Profile |
getProfile()
Returns the Profile information for the user. |
String |
getStatus()
Status of the user to be updated on a provider like Facebook or Twitter. |
org.brickred.socialauth.Profile |
getUserProfile()
Retrieves the user profile from the provider. |
String |
getViewUrl()
Gets the relative URL of the view to which user will be redirected after authentication |
void |
init()
|
void |
login()
This is the most important action. |
void |
logout()
Reinitializes the bean |
void |
setId(String id)
Sets the authentication provider. |
void |
setStatus(String status)
Status of the user to be updated on a provider like Facebook or Twitter. |
void |
setViewUrl(String viewUrl)
Sets the view URL to which the user will be redirected after authentication |
void |
updateStatus()
Updates the status on the given provider. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocialAuth()
| Method Detail |
|---|
public void init()
public String getId()
public void setId(String id)
id - Can either have values facebook, foursquare, google, hotmail,
linkedin, myspace, twitter, yahoo OR an OpenID URLpublic void setViewUrl(String viewUrl)
viewUrl - Relative URL of the view, for example "/openid.xhtml"public String getViewUrl()
public void login()
throws Exception
Exception
public void connect()
throws Exception
Exceptionpublic void logout()
public org.brickred.socialauth.Profile getProfile()
public String getStatus()
public void setStatus(String status)
status -
public void updateStatus()
throws Exception
Exception
public List<org.brickred.socialauth.Contact> getContactList()
throws Exception
Exception
public org.brickred.socialauth.Profile getUserProfile()
throws Exception
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||