|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Extends the BaseFacebook class with the intent of using PHP sessions to store user ids and access tokens. More...
Inheritance diagram for sspmod_authfacebook_Facebook:
Collaboration diagram for sspmod_authfacebook_Facebook:Public Member Functions | |
| __construct (array $config, &$ssp_state) | |
| Identical to the parent constructor, except that we start a PHP session to store the user ID and access token if during the course of execution we discover them. More... | |
Public Member Functions inherited from BaseFacebook | |
| __construct ($config) | |
| Initialize a Facebook Application. More... | |
| setAppId ($appId) | |
| Set the Application ID. More... | |
| getAppId () | |
| Get the Application ID. More... | |
| setApiSecret ($apiSecret) | |
| Set the App Secret. More... | |
| setAppSecret ($appSecret) | |
| Set the App Secret. More... | |
| getApiSecret () | |
| Get the App Secret. More... | |
| getAppSecret () | |
| Get the App Secret. More... | |
| setFileUploadSupport ($fileUploadSupport) | |
| Set the file upload support status. More... | |
| getFileUploadSupport () | |
| Get the file upload support status. More... | |
| useFileUploadSupport () | |
| DEPRECATED! Please use getFileUploadSupport instead. More... | |
| setAccessToken ($access_token) | |
| Sets the access token for api calls. More... | |
| setExtendedAccessToken () | |
| Extend an access token, while removing the short-lived token that might have been generated via client-side flow. More... | |
| getAccessToken () | |
| Determines the access token that should be used for API calls. More... | |
| getSignedRequest () | |
| Retrieve the signed request, either from a request parameter or, if not present, from a cookie. More... | |
| getUser () | |
| Get the UID of the connected user, or 0 if the Facebook user is not connected. More... | |
| getLoginUrl ($params=array()) | |
| Get a Login URL for use with redirects. More... | |
| getLogoutUrl ($params=array()) | |
| Get a Logout URL suitable for use with redirects. More... | |
| getLoginStatusUrl ($params=array()) | |
| Get a login status URL to fetch the status from Facebook. More... | |
| api () | |
| Make an API call. More... | |
| destroySession () | |
| Destroy the current session. More... | |
Data Fields | |
| const | FBSS_COOKIE_NAME = 'fbss' |
| const | FBSS_COOKIE_EXPIRE = 31556926 |
Data Fields inherited from BaseFacebook | |
| const | VERSION = '3.2.2' |
| Version. More... | |
| const | SIGNED_REQUEST_ALGORITHM = 'HMAC-SHA256' |
| Signed Request Algorithm. More... | |
Protected Member Functions | |
| initSharedSession () | |
| setPersistentData ($key, $value) | |
| Provides the implementations of the inherited abstract methods. More... | |
| getPersistentData ($key, $default=false) | |
| Get the data for $key, persisted by BaseFacebook::setPersistentData() More... | |
| clearPersistentData ($key) | |
| Clear the data with $key from the persistent storage. More... | |
| clearAllPersistentData () | |
| Clear all data from the persistent storage. More... | |
| deleteSharedSessionCookie () | |
| getSharedSessionCookieName () | |
| constructSessionVariableName ($key) | |
| establishCSRFTokenState () | |
| Lays down a CSRF state token for this process. More... | |
Protected Member Functions inherited from BaseFacebook | |
| getUserAccessToken () | |
| Determines and returns the user access token, first using the signed request if present, and then falling back on the authorization code if present. More... | |
| getUserFromAvailableData () | |
| Determines the connected user by first examining any signed requests, then considering an authorization code, and then falling back to any persistent store storing the user. More... | |
| getSignedRequestCookieName () | |
| Constructs and returns the name of the cookie that potentially houses the signed request for the app user. More... | |
| getMetadataCookieName () | |
| Constructs and returns the name of the coookie that potentially contain metadata. More... | |
| getCode () | |
| Get the authorization code from the query parameters, if it exists, and otherwise return false to signal no authorization code was discoverable. More... | |
| getUserFromAccessToken () | |
| Retrieves the UID with the understanding that $this->accessToken has already been set and is seemingly legitimate. More... | |
| getApplicationAccessToken () | |
| Returns the access token that should be used for logged out users when no authorization code is available. More... | |
| establishCSRFTokenState () | |
| Lays down a CSRF state token for this process. More... | |
| getAccessTokenFromCode ($code, $redirect_uri=null) | |
| Retrieves an access token for the given authorization code (previously generated from www.facebook.com on behalf of a specific user). More... | |
| _restserver ($params) | |
| Invoke the old restserver.php endpoint. More... | |
| isVideoPost ($path, $method='GET') | |
| Return true if this is video post. More... | |
| _graph ($path, $method='GET', $params=array()) | |
| Invoke the Graph API. More... | |
| _oauthRequest ($url, $params) | |
| Make a OAuth Request. More... | |
| makeRequest ($url, $params, $ch=null) | |
| Makes an HTTP request. More... | |
| parseSignedRequest ($signed_request) | |
| Parses a signed_request and validates the signature. More... | |
| makeSignedRequest ($data) | |
| Makes a signed_request blob using the given data. More... | |
| getApiUrl ($method) | |
| Build the URL for api given parameters. More... | |
| getUrl ($name, $path='', $params=array()) | |
| Build the URL for given domain alias, path and parameters. More... | |
| getHttpHost () | |
| getHttpProtocol () | |
| getBaseDomain () | |
| Get the base domain used for the cookie. More... | |
| getCurrentUrl () | |
| Returns the Current URL, stripping it of known FB parameters that should not persist. More... | |
| throwAPIException ($result) | |
| Analyzes the supplied result to see if it was thrown because the access token is no longer valid. More... | |
| getMetadataCookie () | |
| Parses the metadata cookie that our Javascript API set. More... | |
| setPersistentData ($key, $value) | |
| Each of the following four methods should be overridden in a concrete subclass, as they are in the provided Facebook class. More... | |
| getPersistentData ($key, $default=false) | |
| Get the data for $key, persisted by BaseFacebook::setPersistentData() More... | |
| clearPersistentData ($key) | |
| Clear the data with $key from the persistent storage. More... | |
| clearAllPersistentData () | |
| Clear all data from the persistent storage. More... | |
Protected Attributes | |
| $sharedSessionID | |
| $ssp_state | |
Protected Attributes inherited from BaseFacebook | |
| $appId | |
| $appSecret | |
| $user | |
| $signedRequest | |
| The data from the signed_request token. More... | |
| $state | |
| A CSRF state variable to assist in the defense against CSRF attacks. More... | |
| $accessToken = null | |
| $fileUploadSupport = false | |
| $trustForwarded = false | |
Static Protected Attributes | |
| static | $kSupportedKeys |
Additional Inherited Members | |
Static Public Attributes inherited from BaseFacebook | |
| static | $CURL_OPTS |
| Default options for curl. More... | |
| static | $DOMAIN_MAP |
| Maps aliases to Facebook domains. More... | |
Static Protected Member Functions inherited from BaseFacebook | |
| static | errorLog ($msg) |
| Prints to the error log if you aren't in command line mode. More... | |
| static | base64UrlDecode ($input) |
| Base64 encoding that doesn't need to be urlencode()ed. More... | |
| static | base64UrlEncode ($input) |
| Base64 encoding that doesn't need to be urlencode()ed. More... | |
| static | isAllowedDomain ($big, $small) |
| static | endsWith ($big, $small) |
Extends the BaseFacebook class with the intent of using PHP sessions to store user ids and access tokens.
Definition at line 9 of file Facebook.php.
| sspmod_authfacebook_Facebook::__construct | ( | array | $config, |
| & | $ssp_state | ||
| ) |
Identical to the parent constructor, except that we start a PHP session to store the user ID and access token if during the course of execution we discover them.
| Array | $config | the application configuration. Additionally accepts "sharedSession" as a boolean to turn on a secondary cookie for environments with a shared session (that is, your app shares the domain with other apps). |
Definition at line 35 of file Facebook.php.
References $config, $ssp_state, and initSharedSession().
Here is the call graph for this function:
|
protected |
Clear all data from the persistent storage.
Reimplemented from BaseFacebook.
Definition at line 122 of file Facebook.php.
References $key, clearPersistentData(), and deleteSharedSessionCookie().
Here is the call graph for this function:
|
protected |
Clear the data with $key from the persistent storage.
| string | $key |
Reimplemented from BaseFacebook.
Definition at line 110 of file Facebook.php.
References $key, constructSessionVariableName(), and SimpleSAML\Logger\debug().
Referenced by clearAllPersistentData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 142 of file Facebook.php.
References $key, and BaseFacebook\getAppId().
Referenced by clearPersistentData(), getPersistentData(), and setPersistentData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 131 of file Facebook.php.
References $_COOKIE, BaseFacebook\getBaseDomain(), and getSharedSessionCookieName().
Referenced by clearAllPersistentData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Lays down a CSRF state token for this process.
Reimplemented from BaseFacebook.
Definition at line 150 of file Facebook.php.
References SimpleSAML_Auth_State\getStateId(), and setPersistentData().
Here is the call graph for this function:
|
protected |
Get the data for $key, persisted by BaseFacebook::setPersistentData()
| string | $key | The key of the data to retrieve |
| boolean | $default | The default value to return if $key is not found |
Reimplemented from BaseFacebook.
Definition at line 99 of file Facebook.php.
References $default, $key, constructSessionVariableName(), and SimpleSAML\Logger\debug().
Here is the call graph for this function:
|
protected |
Definition at line 138 of file Facebook.php.
References BaseFacebook\getAppId().
Referenced by deleteSharedSessionCookie(), and initSharedSession().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 47 of file Facebook.php.
References $_COOKIE, $data, $expire, SimpleSAML\Logger\debug(), FBSS_COOKIE_EXPIRE, BaseFacebook\getBaseDomain(), BaseFacebook\getHttpHost(), getSharedSessionCookieName(), BaseFacebook\makeSignedRequest(), and BaseFacebook\parseSignedRequest().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Provides the implementations of the inherited abstract methods.
The implementation uses PHP sessions to maintain a store for authorization codes, user ids, CSRF states, and access tokens.
Reimplemented from BaseFacebook.
Definition at line 89 of file Facebook.php.
References $key, constructSessionVariableName(), and SimpleSAML\Logger\debug().
Referenced by establishCSRFTokenState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprotected |
Definition at line 44 of file Facebook.php.
|
protected |
Definition at line 18 of file Facebook.php.
|
protected |
Definition at line 21 of file Facebook.php.
Referenced by __construct().
| const sspmod_authfacebook_Facebook::FBSS_COOKIE_EXPIRE = 31556926 |
Definition at line 15 of file Facebook.php.
Referenced by initSharedSession().
| const sspmod_authfacebook_Facebook::FBSS_COOKIE_NAME = 'fbss' |
Definition at line 11 of file Facebook.php.