|
||||||||||
| 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)
|
AccessToken |
extendTokenExpiration()
Extends this instance's short-lived-token expiration. |
AccessToken |
extendTokenExpiration(String shortLivedToken)
Extends the short-lived-token expiration. |
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 |
getOAuthAccessTokenInfo()
Returns the access token information. |
AccessToken |
getOAuthAccessTokenInfo(String accessToken)
Returns the access token information. |
AccessToken |
getOAuthAppAccessToken()
Returns an App Access Token. |
String |
getOAuthAuthorizationURL(String callbackURL)
|
String |
getOAuthAuthorizationURL(String callbackURL,
AuthOption authOption)
|
String |
getOAuthAuthorizationURL(String callbackURL,
String state)
|
String |
getOAuthCallbackURL()
Sets the access token and callback URL |
DeviceCode |
getOAuthDeviceCode()
Returns a generated device code. |
AccessToken |
getOAuthDeviceToken(DeviceCode deviceCode)
Returns a Device Access Token. |
String |
getOAuthReAuthenticationURL(String callbackURL,
String nonce)
Returns the URL that asks the person to re-authenticate unconditionally. |
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 String getOAuthAuthorizationURL(String callbackURL,
AuthOption authOption)
getOAuthAuthorizationURL in interface OAuthSupport
public String getOAuthReAuthenticationURL(String callbackURL,
String nonce)
OAuthSupport
getOAuthReAuthenticationURL in interface OAuthSupportcallbackURL - callback urlnonce - a completely arbitrary alphanumeric code that your app generates. see: The auth_nonce parameter
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 authorized
public DeviceCode getOAuthDeviceCode()
throws FacebookException
OAuthSupport
getOAuthDeviceCode in interface OAuthSupportFacebookException - when Facebook service or network is unavailable, or the user has not authorized
public AccessToken getOAuthDeviceToken(DeviceCode deviceCode)
throws FacebookException
OAuthSupport
getOAuthDeviceToken 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 names
public AccessToken extendTokenExpiration(String shortLivedToken)
throws FacebookException
OAuthSupport
extendTokenExpiration in interface OAuthSupportshortLivedToken - access token
FacebookException - when Facebook service or network is unavailable, or the user has not authorized
public AccessToken extendTokenExpiration()
throws FacebookException
OAuthSupport
extendTokenExpiration in interface OAuthSupportFacebookException - when Facebook service or network is unavailable, or the user has not authorized
public AccessToken getOAuthAccessTokenInfo(String accessToken)
throws FacebookException
OAuthSupport
getOAuthAccessTokenInfo in interface OAuthSupportaccessToken - access token
FacebookException - when Facebook service or network is unavailable, or the user has not authorized
public AccessToken getOAuthAccessTokenInfo()
throws FacebookException
OAuthSupport
getOAuthAccessTokenInfo in interface OAuthSupportFacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic 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 | |||||||||