|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object facebook4j.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
- ConfigurationMethod Detail |
---|
public boolean isEnabled()
isEnabled
in interface Authorization
public 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 OAuthSupport
callbackURL
- 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 OAuthSupport
oauthCode
- OAuth code.
FacebookException
- when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessToken(String oauthCode, String callbackURL) throws FacebookException
OAuthSupport
getOAuthAccessToken
in interface OAuthSupport
oauthCode
- 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 OAuthSupport
FacebookException
- when Facebook service or network is unavailable, or the user has not authorizedpublic DeviceCode getOAuthDeviceCode() throws FacebookException
OAuthSupport
getOAuthDeviceCode
in interface OAuthSupport
FacebookException
- when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthDeviceToken(DeviceCode deviceCode) throws FacebookException
OAuthSupport
getOAuthDeviceToken
in interface OAuthSupport
FacebookException
- when Facebook service or network is unavailable, or the user has not authorizedpublic void setOAuthAccessToken(AccessToken accessToken)
OAuthSupport
setOAuthAccessToken
in interface OAuthSupport
accessToken
- access tokenpublic void setOAuthAccessToken(AccessToken accessToken, String callbackURL)
public String getOAuthCallbackURL()
OAuthSupport
getOAuthCallbackURL
in interface OAuthSupport
public void setOAuthCallbackURL(String callbackURL)
OAuthSupport
setOAuthCallbackURL
in interface OAuthSupport
callbackURL
- Callback URLpublic void setOAuthAppId(String appId, String appSecret)
OAuthSupport
setOAuthAppId
in interface OAuthSupport
appId
- OAuth AppIDappSecret
- OAuth App secretpublic void setOAuthPermissions(String permissions)
OAuthSupport
setOAuthPermissions
in interface OAuthSupport
permissions
- comma-separated permission namespublic AccessToken extendTokenExpiration(String shortLivedToken) throws FacebookException
OAuthSupport
extendTokenExpiration
in interface OAuthSupport
shortLivedToken
- access token
FacebookException
- when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken extendTokenExpiration() throws FacebookException
OAuthSupport
extendTokenExpiration
in interface OAuthSupport
FacebookException
- when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessTokenInfo(String accessToken) throws FacebookException
OAuthSupport
getOAuthAccessTokenInfo
in interface OAuthSupport
accessToken
- access token
FacebookException
- when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessTokenInfo() throws FacebookException
OAuthSupport
getOAuthAccessTokenInfo
in interface OAuthSupport
FacebookException
- when Facebook service or network is unavailable, or the user has not authorizedpublic void setAppSecretProofEnabled(boolean enabled)
public boolean isAppSecretProofEnabled()
isAppSecretProofEnabled
in interface Security
public String generateAppSecretProof()
generateAppSecretProof
in interface Security
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |