PHP 클래스 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/)
저자: Michael J. Rubinsky ([email protected])
상속: extends Horde_Service_Facebook_Base
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_sessionKey string Cache the current auth_token.

공개 메소드들

메소드 설명
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.

메소드 상세

getAuthTokenUrl() 공개 메소드

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.
리턴 string The URL.

getLoggedInUser() 공개 메소드

Returns the user corresponding to the current session object.
public getLoggedInUser ( ) : string
리턴 string User id

getOAuthUrl() 공개 메소드

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.
리턴 string The URL.

getSessionKey() 공개 메소드

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.
리턴 string The access_token

revokeExtendedPermission() 공개 메소드

Revoke a previously authorizied extended permission
public revokeExtendedPermission ( string $perm ) : unknown_type
$perm string The extended permission to remove.
리턴 unknown_type

setSession() 공개 메소드

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

프로퍼티 상세

$_sessionKey 보호되어 있는 프로퍼티

Cache the current auth_token.
protected string $_sessionKey
리턴 string