Token verification is as simple as the following:
use SSOfy\Client;
use SSOfy\Models\APIResponse;
...
$client = new Client($config);
/**
* @var APIResponse $result
*/
$result = $client->verifyAuthentication('TOKEN');
Note: The token
parameter may or may not be preceded by Bearer.
Most server-side applications expect the token in their request's Authorization
header to begin with 'Bearer...'. The verifyAuthentication()
method strips the prefix from your string automatically as it shouldn't be included when sent to the api for verification.