Google
in package
Table of Contents
Properties
- $client : Client
- API Clinent
- $clientId : string
- Client ID
- $secretKey : string
- Secret Key
Methods
- __construct() : void
- Constructor
- getAccessToken() : array<string|int, mixed>
- コードからアクセストークンを取得
- getAuthUrl() : string
- 認証URLを取得
- isEnable() : bool
- APIが使用できるか判断
- verifyIdToken() : array<string|int, mixed>
- アクセストークンの検証・ユーザー情報の取得
- getClient() : null|Client
- Google APIアクセスのクライアントを取得
Properties
$client
API Clinent
protected
Client
$client
$clientId
Client ID
protected
string
$clientId
$secretKey
Secret Key
protected
string
$secretKey
Methods
__construct()
Constructor
public
__construct(string $clientId, string $secretKey) : void
Parameters
- $clientId : string
- $secretKey : string
getAccessToken()
コードからアクセストークンを取得
public
getAccessToken(string $code) : array<string|int, mixed>
Parameters
- $code : string
Return values
array<string|int, mixed>getAuthUrl()
認証URLを取得
public
getAuthUrl() : string
Return values
stringisEnable()
APIが使用できるか判断
public
isEnable() : bool
Return values
boolverifyIdToken()
アクセストークンの検証・ユーザー情報の取得
public
verifyIdToken(array<string|int, mixed> $accessToken) : array<string|int, mixed>
Parameters
- $accessToken : array<string|int, mixed>
Return values
array<string|int, mixed>getClient()
Google APIアクセスのクライアントを取得
protected
getClient() : null|Client