mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-22 05:30:22 +08:00
Dev: Fixed flaky OIDC test, updated dev version
This commit is contained in:
parent
2ed931aeed
commit
07761524af
|
@ -594,10 +594,16 @@ class OidcTest extends TestCase
|
|||
{
|
||||
config()->set(['oidc.end_session_endpoint' => 'https://example.com/logout']);
|
||||
|
||||
$this->runLogin();
|
||||
// Fix times so our token is predictable
|
||||
$claimOverrides = [
|
||||
'iat' => time(),
|
||||
'exp' => time() + 720,
|
||||
'auth_time' => time()
|
||||
];
|
||||
$this->runLogin($claimOverrides);
|
||||
|
||||
$resp = $this->asEditor()->post('/oidc/logout');
|
||||
$query = 'id_token_hint=' . urlencode(OidcJwtHelper::idToken()) . '&post_logout_redirect_uri=' . urlencode(url('/'));
|
||||
$query = 'id_token_hint=' . urlencode(OidcJwtHelper::idToken($claimOverrides)) . '&post_logout_redirect_uri=' . urlencode(url('/'));
|
||||
$resp->assertRedirect('https://example.com/logout?' . $query);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user