- 'auth.method' => 'saml2',
- 'auth.defaults.guard' => 'saml2',
- 'saml2.name' => 'SingleSignOn-Testing',
- 'saml2.email_attribute' => 'email',
- 'saml2.display_name_attributes' => ['first_name', 'last_name'],
- 'saml2.external_id_attribute' => 'uid',
- 'saml2.user_to_groups' => false,
- 'saml2.group_attribute' => 'user_groups',
- 'saml2.remove_from_groups' => false,
- 'saml2.onelogin_overrides' => null,
- 'saml2.onelogin.idp.entityId' => 'http://saml.local/saml2/idp/metadata.php',
- 'saml2.onelogin.idp.singleSignOnService.url' => 'http://saml.local/saml2/idp/SSOService.php',
- 'saml2.onelogin.idp.singleLogoutService.url' => 'http://saml.local/saml2/idp/SingleLogoutService.php',
- 'saml2.autoload_from_metadata' => false,
- 'saml2.onelogin.idp.x509cert' => $this->testCert,
- 'saml2.onelogin.debug' => false,
+ 'auth.method' => 'saml2',
+ 'auth.defaults.guard' => 'saml2',
+ 'saml2.name' => 'SingleSignOn-Testing',
+ 'saml2.email_attribute' => 'email',
+ 'saml2.display_name_attributes' => ['first_name', 'last_name'],
+ 'saml2.external_id_attribute' => 'uid',
+ 'saml2.user_to_groups' => false,
+ 'saml2.group_attribute' => 'user_groups',
+ 'saml2.remove_from_groups' => false,
+ 'saml2.onelogin_overrides' => null,
+ 'saml2.onelogin.idp.entityId' => 'http://saml.local/saml2/idp/metadata.php',
+ 'saml2.onelogin.idp.singleSignOnService.url' => 'http://saml.local/saml2/idp/SSOService.php',
+ 'saml2.onelogin.idp.singleLogoutService.url' => 'http://saml.local/saml2/idp/SingleLogoutService.php',
+ 'saml2.autoload_from_metadata' => false,
+ 'saml2.onelogin.idp.x509cert' => $this->testCert,
+ 'saml2.onelogin.debug' => false,
$acsPost = $this->post('/saml2/acs');
$acsPost->assertRedirect('/');
$this->assertTrue($this->isAuthenticated());
$this->assertDatabaseHas('users', [
$acsPost = $this->post('/saml2/acs');
$acsPost->assertRedirect('/');
$this->assertTrue($this->isAuthenticated());
$this->assertDatabaseHas('users', [
$user = User::query()->where('external_auth_id', '=', 'user')->first();
$userRoleIds = $user->roles()->pluck('id');
$this->assertContains($memberRole->id, $userRoleIds, 'User was assigned to member role');
$this->assertContains($adminRole->id, $userRoleIds, 'User was assigned to admin role');
$user = User::query()->where('external_auth_id', '=', 'user')->first();
$userRoleIds = $user->roles()->pluck('id');
$this->assertContains($memberRole->id, $userRoleIds, 'User was assigned to member role');
$this->assertContains($adminRole->id, $userRoleIds, 'User was assigned to admin role');
$acsPost->assertRedirect('/login');
$this->assertFalse($this->isAuthenticated());
$this->assertDatabaseHas('users', [
$acsPost->assertRedirect('/login');
$this->assertFalse($this->isAuthenticated());
$this->assertDatabaseHas('users', [