|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.brickred.socialauth.AbstractProvider
org.brickred.socialauth.provider.FourSquareImpl
public class FourSquareImpl
Provider implementation for FourSquare. This uses the oAuth API provided by FourSquare
| Field Summary |
|---|
| Fields inherited from interface org.brickred.socialauth.AuthProvider |
|---|
COUNTRY, DOB, EMAIL, EXT_NAMESPACE, FIRST_NAME, FULL_NAME, GENDER, LANGUAGE, LAST_NAME, NICK_NAME, POSTCODE |
| Constructor Summary | |
|---|---|
FourSquareImpl(Properties props)
|
|
| Method Summary | |
|---|---|
Response |
api(String url,
String methodType,
Map<String,String> params,
Map<String,String> headerParams,
String body)
Makes HTTP request to a given URL. |
List<Contact> |
getContactList()
Gets the list of contacts of the user. |
String |
getLoginRedirectURL(String redirectUri)
This is the most important action. |
Profile |
getUserProfile()
Retrieves the user profile. |
void |
logout()
Logout |
void |
setPermission(Permission p)
|
void |
updateStatus(String msg)
Updates the status on the chosen provider if available. |
Profile |
verifyResponse(javax.servlet.http.HttpServletRequest request)
Verifies the user when the external provider redirects back to our application. |
| Methods inherited from class org.brickred.socialauth.AbstractProvider |
|---|
isProviderState, setProviderState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FourSquareImpl(Properties props)
throws Exception
Exception| Method Detail |
|---|
public String getLoginRedirectURL(String redirectUri)
throws Exception
getLoginRedirectURL in interface AuthProviderException
public Profile verifyResponse(javax.servlet.http.HttpServletRequest request)
throws Exception
verifyResponse in interface AuthProviderrequest - Request object the request is received from the provider
Exception
public List<Contact> getContactList()
throws Exception
getContactList in interface AuthProviderException
public void updateStatus(String msg)
throws Exception
updateStatus in interface AuthProvidermsg - Message to be shown as user's status
Exceptionpublic void logout()
logout in interface AuthProviderpublic void setPermission(Permission p)
setPermission in interface AuthProviderp - Permission object which can be Permission.AUHTHENTICATE_ONLY,
Permission.ALL, Permission.DEFAULT
public Response api(String url,
String methodType,
Map<String,String> params,
Map<String,String> headerParams,
String body)
throws Exception
api in interface AuthProviderurl - URL to make HTTP request.methodType - Method type can be GET, POST or PUTparams - Not in use for FourSquare api function. You can pass required
parameter in query string.headerParams - Parameters need to pass as Header Parametersbody - Request Body
Exceptionpublic Profile getUserProfile()
getUserProfile in interface AuthProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||