UserInfo
$client = new Svgta\OidcClient\init(
'https://id.provider.com/.well-known/openid-configuration',
'Your_client_id',
'Your_client_secret'
);
// ...
$tokenRes = $client->token();
// ...
$tokens = $tokenRes->get_tokens();
// ...
$userInfo = $client->userInfo();
// method : $client->userInfo($access_token = null, $id_token = null);
// access_token and id_token are optionals if set in session (the method $tokenRes->get_tokens() do it)
... $tokenRes = $client->token(); $tokens = $tokenRes->get_tokens(); $payload = $tokenRes->get_id_token_payload(); //result is an array
Last updated