PHP Class Horde_Service_Facebook_Auth, horde

For now, only provide methods for authenticating that make sense from within a Horde context. Copyright 2009-2016 Horde LLC (http://www.horde.org/)
Author: Michael J. Rubinsky ([email protected])
Inheritance: extends Horde_Service_Facebook_Base
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_sessionKey string Cache the current auth_token.

Méthodes publiques

Méthode Description
getAuthTokenUrl ( string $code, string $callback ) : string Returns the URL to obtain the auth_token from FB after getOAuthUrl redirects back to your callback URL.
getLoggedInUser ( ) : string Returns the user corresponding to the current session object.
getOAuthUrl ( string $callback, array $perms = [], string $state = null ) : string Get the URL for the user to authenticate the application and authorize various extender permissions/
getSessionKey ( string $code = null, string $callback = '' ) : string Obtain the current access_token. Either returns the currently set token or, if a OAuth2 code is provided, sends a GET request to FB requesting the access_token.
revokeExtendedPermission ( string $perm ) : unknown_type Revoke a previously authorizied extended permission
setSession ( string $sessionKey ) Sets an existing access_token for this session.

Method Details

getAuthTokenUrl() public méthode

Returns the URL to obtain the auth_token from FB after getOAuthUrl redirects back to your callback URL.
public getAuthTokenUrl ( string $code, string $callback ) : string
$code string The code returned by FB after the OAuth2 dialog
$callback string The callback url. Required in order to authenticate via OAuth2.
Résultat string The URL.

getLoggedInUser() public méthode

Returns the user corresponding to the current session object.
public getLoggedInUser ( ) : string
Résultat string User id

getOAuthUrl() public méthode

Get the URL for the user to authenticate the application and authorize various extender permissions/
public getOAuthUrl ( string $callback, array $perms = [], string $state = null ) : string
$callback string The callback url. FB will redirect back to here.
$perms array An array of FB permissions to request.
$state string A random, but unique string for FB to return to ensure security.
Résultat string The URL.

getSessionKey() public méthode

Obtain the current access_token. Either returns the currently set token or, if a OAuth2 code is provided, sends a GET request to FB requesting the access_token.
public getSessionKey ( string $code = null, string $callback = '' ) : string
$code string The code returned from FB's OAuth dialog.
$callback string If provided, used as the callback URL required during the final steps in the OAuth2 process.
Résultat string The access_token

revokeExtendedPermission() public méthode

Revoke a previously authorizied extended permission
public revokeExtendedPermission ( string $perm ) : unknown_type
$perm string The extended permission to remove.
Résultat unknown_type

setSession() public méthode

Sets an existing access_token for this session.
public setSession ( string $sessionKey )
$sessionKey string The FB OAuth2 access_token

Property Details

$_sessionKey protected_oe property

Cache the current auth_token.
protected string $_sessionKey
Résultat string