$name
$name : string
Provider name.
Class WeChatProvider.
$request : \Symfony\Component\HttpFoundation\Request
The HTTP request instance.
$accessToken : \Overtrue\Socialite\AccessTokenInterface
$component : \Overtrue\Socialite\WeChatComponentInterface
__construct(\Symfony\Component\HttpFoundation\Request $request, string $clientId, string $clientSecret, string|null $redirectUrl = null)
Create a new provider instance.
\Symfony\Component\HttpFoundation\Request | $request | |
string | $clientId | |
string | $clientSecret | |
string|null | $redirectUrl |
redirect(string $redirectUrl = null) : \Symfony\Component\HttpFoundation\RedirectResponse
Redirect the user of the application to the provider's authentication screen.
string | $redirectUrl |
user(\Overtrue\Socialite\AccessTokenInterface $token = null) : \Overtrue\Socialite\User
Get the User instance for the authenticated user.
\Overtrue\Socialite\AccessTokenInterface | $token |
setAccessToken(\Overtrue\Socialite\AccessTokenInterface $accessToken) : $this
\Overtrue\Socialite\AccessTokenInterface | $accessToken |
getAccessToken(string $code) : \Overtrue\Socialite\AccessTokenInterface
{@inheritdoc}.
string | $code |
setRequest(\Symfony\Component\HttpFoundation\Request $request) : $this
Set the request instance.
\Symfony\Component\HttpFoundation\Request | $request |
getRequest() : \Symfony\Component\HttpFoundation\Request
Get the request instance.
component(\Overtrue\Socialite\WeChatComponentInterface $component) : $this
WeChat OpenPlatform 3rd component.
\Overtrue\Socialite\WeChatComponentInterface | $component |
getUserByToken(\Overtrue\Socialite\AccessTokenInterface $token) : array
{@inheritdoc}.
\Overtrue\Socialite\AccessTokenInterface | $token |
mapUserToObject(array $user) : \Overtrue\Socialite\User
{@inheritdoc}.
array | $user |
parseAccessToken(\Psr\Http\Message\StreamInterface|array $body) : \Overtrue\Socialite\AccessTokenInterface
Get the access token from the token response body.
\Psr\Http\Message\StreamInterface|array | $body |
getHttpClient() : \GuzzleHttp\Client
Get a fresh instance of the Guzzle HTTP client.