PHP 클래스 Webiny\Component\OAuth2\OAuth2

This component is used for communication with OAuth2 servers like Facebook Graph API.
상속: use trait Webiny\Component\StdLib\ComponentTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( AbstractOAuth2 $instance ) Base constructor.
getAccessToken ( ) : string Get access token.
getAccessTokenName ( ) : string Returns the name of access token param. Its usually either 'access_token' or 'token' based on the OAuth2 server.
getAuthenticationUrl ( ) : string Returns the authentication url.
getCertificate ( ) : string Returns the path to certificate.
getClientId ( ) : string Get client id.
getClientSecret ( ) : string Get client secret.
getRedirectURI ( ) : string Get the defined redirect URI.
getScope ( ) : string Get the defined scope.
getState ( ) : string Get the state parameter.
request ( ) : AbstractServer
requestAccessToken ( ) : string Requests the access token from the OAuth server.
setAccessToken ( string $accessToken ) : void Set the access token.
setCertificate ( string $pathToCertificate ) : void Set the certificate used by OAuth2 requests.
setScope ( string $scope ) : void Set the request scope.
setState ( string $state ) : void. Set the state parameter.

비공개 메소드들

메소드 설명
processUrl ( string $url ) : string Replaces the url variables with real data.

메소드 상세

__construct() 공개 메소드

NOTE: Use OAuth2Loader::getInstance method to get an OAuth2 instance.
public __construct ( AbstractOAuth2 $instance )
$instance Webiny\Component\OAuth2\Bridge\AbstractOAuth2

getAccessToken() 공개 메소드

Get access token.
public getAccessToken ( ) : string
리턴 string Access token.

getAccessTokenName() 공개 메소드

Returns the name of access token param. Its usually either 'access_token' or 'token' based on the OAuth2 server.
public getAccessTokenName ( ) : string
리턴 string

getAuthenticationUrl() 공개 메소드

Returns the authentication url.
public getAuthenticationUrl ( ) : string
리턴 string Authentication url

getCertificate() 공개 메소드

Returns the path to certificate.
public getCertificate ( ) : string
리턴 string Path to certificate.

getClientId() 공개 메소드

Get client id.
public getClientId ( ) : string
리턴 string Client id.

getClientSecret() 공개 메소드

Get client secret.
public getClientSecret ( ) : string
리턴 string Client secret.

getRedirectURI() 공개 메소드

Get the defined redirect URI.
public getRedirectURI ( ) : string
리턴 string Redirect URI.

getScope() 공개 메소드

Get the defined scope.
public getScope ( ) : string
리턴 string A comma separated list of parameters.

getState() 공개 메소드

Get the state parameter.
public getState ( ) : string
리턴 string State parameter

request() 공개 메소드

public request ( ) : AbstractServer
리턴 AbstractServer

requestAccessToken() 공개 메소드

You can call this method only on the OAuth redirect_uri page or else the request will fail.
public requestAccessToken ( ) : string
리턴 string Access token.

setAccessToken() 공개 메소드

Set the access token.
public setAccessToken ( string $accessToken ) : void
$accessToken string Access token.
리턴 void

setCertificate() 공개 메소드

Set the certificate used by OAuth2 requests.
public setCertificate ( string $pathToCertificate ) : void
$pathToCertificate string Absolute path to the certificate file.
리턴 void

setScope() 공개 메소드

Set the request scope.
public setScope ( string $scope ) : void
$scope string A comma-separated list of parameters. Example: email,extender_permissions
리턴 void

setState() 공개 메소드

Set the state parameter.
public setState ( string $state ) : void.
$state string State name.
리턴 void.