|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfacebook4j.auth.OAuthAuthorization
public class OAuthAuthorization
| Field Summary | |
|---|---|
static String |
HMAC_SHA_256
|
| Constructor Summary | |
|---|---|
OAuthAuthorization(Configuration conf)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
String |
generateAppSecretProof()
Computes a appsecret_proof value using the HMAC method. |
AccessToken |
getOAuthAccessToken()
Returns an access token associated with this instance. |
AccessToken |
getOAuthAccessToken(String oauthCode)
Exchange the code for a User Access Token. |
AccessToken |
getOAuthAccessToken(String oauthCode,
String callbackURL)
Exchange the code for a User Access Token. |
AccessToken |
getOAuthAppAccessToken()
Returns an App Access Token. |
String |
getOAuthAuthorizationURL(String callbackURL)
|
String |
getOAuthAuthorizationURL(String callbackURL,
String state)
|
String |
getOAuthCallbackURL()
Sets the access token and callback URL |
int |
hashCode()
|
boolean |
isAppSecretProofEnabled()
|
boolean |
isEnabled()
#{inheritDoc} |
void |
setAppSecretProofEnabled(boolean enabled)
|
void |
setOAuthAccessToken(AccessToken accessToken)
Sets the access token |
void |
setOAuthAccessToken(AccessToken accessToken,
String callbackURL)
|
void |
setOAuthAppId(String appId,
String appSecret)
sets the OAuth AppID and App secret |
void |
setOAuthCallbackURL(String callbackURL)
Sets the access token |
void |
setOAuthPermissions(String permissions)
sets the permissions |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String HMAC_SHA_256
| Constructor Detail |
|---|
public OAuthAuthorization(Configuration conf)
conf - Configuration| Method Detail |
|---|
public boolean isEnabled()
isEnabled in interface Authorizationpublic String getOAuthAuthorizationURL(String callbackURL)
getOAuthAuthorizationURL in interface OAuthSupport
public String getOAuthAuthorizationURL(String callbackURL,
String state)
getOAuthAuthorizationURL in interface OAuthSupport
public AccessToken getOAuthAccessToken(String oauthCode)
throws FacebookException
OAuthSupport
getOAuthAccessToken in interface OAuthSupportoauthCode - OAuth code.
FacebookException - when Facebook service or network is unavailable, or the user has not authorized
public AccessToken getOAuthAccessToken(String oauthCode,
String callbackURL)
throws FacebookException
OAuthSupport
getOAuthAccessToken in interface OAuthSupportoauthCode - OAuth code.callbackURL - callback URL
FacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessToken()
OAuthSupport
getOAuthAccessToken in interface OAuthSupport
public AccessToken getOAuthAppAccessToken()
throws FacebookException
OAuthSupport
getOAuthAppAccessToken in interface OAuthSupportFacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic void setOAuthAccessToken(AccessToken accessToken)
OAuthSupport
setOAuthAccessToken in interface OAuthSupportaccessToken - access token
public void setOAuthAccessToken(AccessToken accessToken,
String callbackURL)
public String getOAuthCallbackURL()
OAuthSupport
getOAuthCallbackURL in interface OAuthSupportpublic void setOAuthCallbackURL(String callbackURL)
OAuthSupport
setOAuthCallbackURL in interface OAuthSupportcallbackURL - Callback URL
public void setOAuthAppId(String appId,
String appSecret)
OAuthSupport
setOAuthAppId in interface OAuthSupportappId - OAuth AppIDappSecret - OAuth App secretpublic void setOAuthPermissions(String permissions)
OAuthSupport
setOAuthPermissions in interface OAuthSupportpermissions - comma-separated permission namespublic void setAppSecretProofEnabled(boolean enabled)
public boolean isAppSecretProofEnabled()
isAppSecretProofEnabled in interface Securitypublic String generateAppSecretProof()
generateAppSecretProof in interface Securitypublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||