feat(iam): add guarded identity management and ERP launch source
This commit is contained in:
@@ -14,6 +14,13 @@ final class IamOidcClient
|
||||
private array $config;
|
||||
private $transport;
|
||||
private ?array $discovery = null;
|
||||
private ?string $verifiedToken = null;
|
||||
|
||||
public function verifiedIdToken(): string
|
||||
{
|
||||
if ($this->verifiedToken === null) { throw new RuntimeException("IAM token not verified"); }
|
||||
return $this->verifiedToken;
|
||||
}
|
||||
|
||||
/** Transport signature: (method, url, headers, body): ['status'=>int, 'body'=>string]. */
|
||||
public function __construct(array $config, ?callable $transport = null)
|
||||
@@ -102,6 +109,7 @@ final class IamOidcClient
|
||||
|| (isset($claims['nbf']) && (!is_int($claims['nbf']) || $claims['nbf'] > $now))) {
|
||||
throw new RuntimeException('IAM ID token claims are invalid');
|
||||
}
|
||||
$this->verifiedToken = $response['id_token'];
|
||||
return $claims;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user