PHP 클래스 Overtrue\Socialite\Providers\AbstractProvider

상속: implements Overtrue\Socialite\ProviderInterface
파일 보기 프로젝트 열기: overtrue/socialite 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$clientId string The client ID.
$clientSecret string The client secret.
$config Overtrue\Socialite\Config The configuration.
$encodingType The type of the encoding in the query.
$parameters array The custom parameters to be sent with the request.
$redirectUrl string The redirect URL.
$request Symfony\Component\HttpFoundation\Request The HTTP request instance.
$scopeSeparator string The separating character for the requested scopes.
$scopes array The scopes being requested.
$stateless boolean Indicates if the session state should be utilized.

공개 메소드들

메소드 설명
__construct ( Request $request, Config $config, string $clientId, string $clientSecret, string | null $redirectUrl = null ) Create a new provider instance.
getAccessToken ( string $code ) : AccessToken Get the access token for the given code.
getRedirectUrl ( ) : string Return the redirect url.
getRequest ( ) : Request Get the request instance.
redirect ( string $redirectUrl = null ) : RedirectResponse Redirect the user of the application to the provider's authentication screen.
scopes ( array $scopes ) Set the scopes of the requested access.
setRedirectUrl ( string $redirectUrl ) Set redirect url.
setRequest ( Request $request ) Set the request instance.
stateless ( ) Indicates that the provider should operate as stateless.
user ( Overtrue\Socialite\AccessTokenInterface $token = null )
with ( array $parameters ) Set the custom parameters of the request.
withRedirectUrl ( string $redirectUrl ) Set redirect url.

보호된 메소드들

메소드 설명
arrayItem ( array $array, string $key, mixed $default = null ) : mixed Return array item by key.
buildAuthUrlFromBase ( string $url, string $state ) : string Get the authentication URL for the provider.
formatScopes ( array $scopes, string $scopeSeparator ) : string Format the given scopes.
getAuthUrl ( string $state ) : string Get the authentication URL for the provider.
getCode ( ) : string Get the code from the request.
getCodeFields ( string | null $state = null ) : array Get the GET parameters for the code request.
getHttpClient ( ) : Client Get a fresh instance of the Guzzle HTTP client.
getTokenFields ( string $code ) : array Get the POST fields for the token request.
getTokenUrl ( ) : string Get the token URL for the provider.
getUserByToken ( Overtrue\Socialite\AccessTokenInterface $token ) : array Get the raw user for the given access token.
hasInvalidState ( ) : boolean Determine if the current request / session has a mismatching "state".
isStateless ( ) : boolean Determine if the provider is operating as stateless.
mapUserToObject ( array $user ) : Overtrue\Socialite\User Map the raw user array to a Socialite User instance.
parseAccessToken ( Psr\Http\Message\StreamInterface | array $body ) : AccessToken Get the access token from the token response body.
usesState ( ) : boolean Determine if the provider is operating with state.

메소드 상세

__construct() 공개 메소드

Create a new provider instance.
public __construct ( Request $request, Config $config, string $clientId, string $clientSecret, string | null $redirectUrl = null )
$request Symfony\Component\HttpFoundation\Request
$config Overtrue\Socialite\Config
$clientId string
$clientSecret string
$redirectUrl string | null

arrayItem() 보호된 메소드

Return array item by key.
protected arrayItem ( array $array, string $key, mixed $default = null ) : mixed
$array array
$key string
$default mixed
리턴 mixed

buildAuthUrlFromBase() 보호된 메소드

Get the authentication URL for the provider.
protected buildAuthUrlFromBase ( string $url, string $state ) : string
$url string
$state string
리턴 string

formatScopes() 보호된 메소드

Format the given scopes.
protected formatScopes ( array $scopes, string $scopeSeparator ) : string
$scopes array
$scopeSeparator string
리턴 string

getAccessToken() 공개 메소드

Get the access token for the given code.
public getAccessToken ( string $code ) : AccessToken
$code string
리턴 Overtrue\Socialite\AccessToken

getAuthUrl() 추상적인 보호된 메소드

Get the authentication URL for the provider.
abstract protected getAuthUrl ( string $state ) : string
$state string
리턴 string

getCode() 보호된 메소드

Get the code from the request.
protected getCode ( ) : string
리턴 string

getCodeFields() 보호된 메소드

Get the GET parameters for the code request.
protected getCodeFields ( string | null $state = null ) : array
$state string | null
리턴 array

getHttpClient() 보호된 메소드

Get a fresh instance of the Guzzle HTTP client.
protected getHttpClient ( ) : Client
리턴 GuzzleHttp\Client

getRedirectUrl() 공개 메소드

Return the redirect url.
public getRedirectUrl ( ) : string
리턴 string

getRequest() 공개 메소드

Get the request instance.
public getRequest ( ) : Request
리턴 Symfony\Component\HttpFoundation\Request

getTokenFields() 보호된 메소드

Get the POST fields for the token request.
protected getTokenFields ( string $code ) : array
$code string
리턴 array

getTokenUrl() 추상적인 보호된 메소드

Get the token URL for the provider.
abstract protected getTokenUrl ( ) : string
리턴 string

getUserByToken() 추상적인 보호된 메소드

Get the raw user for the given access token.
abstract protected getUserByToken ( Overtrue\Socialite\AccessTokenInterface $token ) : array
$token Overtrue\Socialite\AccessTokenInterface
리턴 array

hasInvalidState() 보호된 메소드

Determine if the current request / session has a mismatching "state".
protected hasInvalidState ( ) : boolean
리턴 boolean

isStateless() 보호된 메소드

Determine if the provider is operating as stateless.
protected isStateless ( ) : boolean
리턴 boolean

mapUserToObject() 추상적인 보호된 메소드

Map the raw user array to a Socialite User instance.
abstract protected mapUserToObject ( array $user ) : Overtrue\Socialite\User
$user array
리턴 Overtrue\Socialite\User

parseAccessToken() 보호된 메소드

Get the access token from the token response body.
protected parseAccessToken ( Psr\Http\Message\StreamInterface | array $body ) : AccessToken
$body Psr\Http\Message\StreamInterface | array
리턴 Overtrue\Socialite\AccessToken

redirect() 공개 메소드

Redirect the user of the application to the provider's authentication screen.
public redirect ( string $redirectUrl = null ) : RedirectResponse
$redirectUrl string
리턴 Symfony\Component\HttpFoundation\RedirectResponse

scopes() 공개 메소드

Set the scopes of the requested access.
public scopes ( array $scopes )
$scopes array

setRedirectUrl() 공개 메소드

Set redirect url.
public setRedirectUrl ( string $redirectUrl )
$redirectUrl string

setRequest() 공개 메소드

Set the request instance.
public setRequest ( Request $request )
$request Symfony\Component\HttpFoundation\Request

stateless() 공개 메소드

Indicates that the provider should operate as stateless.
public stateless ( )

user() 공개 메소드

public user ( Overtrue\Socialite\AccessTokenInterface $token = null )
$token Overtrue\Socialite\AccessTokenInterface

usesState() 보호된 메소드

Determine if the provider is operating with state.
protected usesState ( ) : boolean
리턴 boolean

with() 공개 메소드

Set the custom parameters of the request.
public with ( array $parameters )
$parameters array

withRedirectUrl() 공개 메소드

Set redirect url.
public withRedirectUrl ( string $redirectUrl )
$redirectUrl string

프로퍼티 상세

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

The client ID.
protected string $clientId
리턴 string

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

The client secret.
protected string $clientSecret
리턴 string

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

The configuration.
protected Config,Overtrue\Socialite $config
리턴 Overtrue\Socialite\Config

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

The type of the encoding in the query.
protected $encodingType

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

The custom parameters to be sent with the request.
protected array $parameters
리턴 array

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

The redirect URL.
protected string $redirectUrl
리턴 string

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

The HTTP request instance.
protected Request,Symfony\Component\HttpFoundation $request
리턴 Symfony\Component\HttpFoundation\Request

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

The separating character for the requested scopes.
protected string $scopeSeparator
리턴 string

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

The scopes being requested.
protected array $scopes
리턴 array

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

Indicates if the session state should be utilized.
protected bool $stateless
리턴 boolean