Skip to content

Tei1988/php-iap-bearer-token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google IAP Bearer Token

Usage

  1. add tei1988/iap-bearer-token to composer.json

  2. set JSON format Key file path for ServiceAccount to GOOGLE_CLOUD_CREDENTIALS

  3. use trait in your class

class Hoge
{
  use GoogleIAP\BearerTokenTrait;

  const GOOGLE_IAP_CLIENT_ID = '<Your Google IAP Client ID>';

  public function fuga() {
    $bearerToken = $this->getBearerToken(self::GOOGLE_IAP_CLIENT_ID);

    var_dump($bearerToken);
  }
}

$instance = new Hoge();
$instance->fuga();

About

Helper trait for getting Google IAP Access Token

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages