Skip to content
Snippets Groups Projects
Commit 621b9767 authored by Patrick Radtke's avatar Patrick Radtke
Browse files

Style updates

parent 0cebe5a0
No related branches found
No related tags found
No related merge requests found
...@@ -231,12 +231,10 @@ class OAuth2 extends \SimpleSAML\Auth\Source ...@@ -231,12 +231,10 @@ class OAuth2 extends \SimpleSAML\Auth\Source
); );
return $provider->getParsedResponse($apiRequest); return $provider->getParsedResponse($apiRequest);
}, },
$this->config->getInteger('retryOnError', 1) $this->config->getInteger('retryOnError', 1));
);
if (!empty($apiAttributes)) { if (!empty($apiAttributes)) {
$attributes = array_replace_recursive($attributes, $apiAttributes); $attributes = array_replace_recursive($attributes, $apiAttributes);
} }
} catch (\Exception $e) { } catch (\Exception $e) {
// not retrieving additional resources, should not fail the authentication // not retrieving additional resources, should not fail the authentication
Logger::error( Logger::error(
......
...@@ -112,7 +112,7 @@ PAhYHoCqrQnOoRh7ieVvAQUeiaKASjngGSo+5GWpsMzQO05+2J3vId01f0oRUTJY ...@@ -112,7 +112,7 @@ PAhYHoCqrQnOoRh7ieVvAQUeiaKASjngGSo+5GWpsMzQO05+2J3vId01f0oRUTJY
trKppNS8LxXr8BXSp66SBwgXZEhFLOcmnM9zZEAPt/DMd3IQZUaOF3w5h3ZUHMXc trKppNS8LxXr8BXSp66SBwgXZEhFLOcmnM9zZEAPt/DMd3IQZUaOF3w5h3ZUHMXc
zwIDAQAB zwIDAQAB
-----END PUBLIC KEY-----', -----END PUBLIC KEY-----',
) )
), ),
// This is a authentication source which handles admin authentication. // This is a authentication source which handles admin authentication.
......
...@@ -110,11 +110,11 @@ $config = array( ...@@ -110,11 +110,11 @@ $config = array(
* Logging. * Logging.
* *
* define the minimum log level to log * define the minimum log level to log
* SimpleSAML\Logger::ERR No statistics, only errors * SimpleSAML\Logger::ERR No statistics, only errors
* SimpleSAML\Logger::WARNING No statistics, only warnings/errors * SimpleSAML\Logger::WARNING No statistics, only warnings/errors
* SimpleSAML\Logger::NOTICE Statistics and errors * SimpleSAML\Logger::NOTICE Statistics and errors
* SimpleSAML\Logger::INFO Verbose logs * SimpleSAML\Logger::INFO Verbose logs
* SimpleSAML\Logger::DEBUG Full debug logs - not recommended for production * SimpleSAML\Logger::DEBUG Full debug logs - not recommended for production
* *
* Choose logging handler. * Choose logging handler.
* *
...@@ -274,12 +274,12 @@ $config = array( ...@@ -274,12 +274,12 @@ $config = array(
* Example: * Example:
* *
* 'module.enable' => array( * 'module.enable' => array(
* // Setting to TRUE enables. * // Setting to TRUE enables.
* 'exampleauth' => TRUE, * 'exampleauth' => TRUE,
* // Setting to FALSE disables. * // Setting to FALSE disables.
* 'saml' => FALSE, * 'saml' => FALSE,
* // Unset or NULL uses default. * // Unset or NULL uses default.
* 'core' => NULL, * 'core' => NULL,
* ), * ),
* *
*/ */
......
...@@ -28,9 +28,10 @@ class OpenIDConnectTest extends OAuth2Test ...@@ -28,9 +28,10 @@ class OpenIDConnectTest extends OAuth2Test
// Some of the constructs in this test cause a Configuration to be created prior to us // Some of the constructs in this test cause a Configuration to be created prior to us
// setting the one we want to use for the test. // setting the one we want to use for the test.
Configuration::clearInternalState(); Configuration::clearInternalState();
} }
public function finalStepsDataProvider() { public function finalStepsDataProvider()
{
return [ return [
[ [
[ [
...@@ -80,7 +81,8 @@ class OpenIDConnectTest extends OAuth2Test ...@@ -80,7 +81,8 @@ class OpenIDConnectTest extends OAuth2Test
]; ];
} }
public function authenticateDataProvider() { public function authenticateDataProvider()
{
MockOpenIDConnectProvider::setConfig([ MockOpenIDConnectProvider::setConfig([
'authorization_endpoint' => 'https://example.com/auth', 'authorization_endpoint' => 'https://example.com/auth',
'token_endpoint' => 'https://example.com/token', 'token_endpoint' => 'https://example.com/token',
...@@ -125,7 +127,8 @@ class OpenIDConnectTest extends OAuth2Test ...@@ -125,7 +127,8 @@ class OpenIDConnectTest extends OAuth2Test
} }
public function testLogoutNoEndpointConfigured() { public function testLogoutNoEndpointConfigured()
{
MockOpenIDConnectProvider::setConfig([ MockOpenIDConnectProvider::setConfig([
'authorization_endpoint' => 'https://example.com/auth', 'authorization_endpoint' => 'https://example.com/auth',
'token_endpoint' => 'https://example.com/token', 'token_endpoint' => 'https://example.com/token',
...@@ -139,7 +142,8 @@ class OpenIDConnectTest extends OAuth2Test ...@@ -139,7 +142,8 @@ class OpenIDConnectTest extends OAuth2Test
$this->assertNull($as->logout($state)); $this->assertNull($as->logout($state));
} }
public function testLogoutNoIDTokenInState() { public function testLogoutNoIDTokenInState()
{
MockOpenIDConnectProvider::setConfig([ MockOpenIDConnectProvider::setConfig([
'authorization_endpoint' => 'https://example.com/auth', 'authorization_endpoint' => 'https://example.com/auth',
'token_endpoint' => 'https://example.com/token', 'token_endpoint' => 'https://example.com/token',
...@@ -154,7 +158,8 @@ class OpenIDConnectTest extends OAuth2Test ...@@ -154,7 +158,8 @@ class OpenIDConnectTest extends OAuth2Test
$this->assertNull($as->logout($state)); $this->assertNull($as->logout($state));
} }
public function testLogoutRedirects() { public function testLogoutRedirects()
{
// Override redirect behavior // Override redirect behavior
MockHttp::throwOnRedirectTrustedURL(); MockHttp::throwOnRedirectTrustedURL();
MockOpenIDConnectProvider::setConfig([ MockOpenIDConnectProvider::setConfig([
......
...@@ -14,7 +14,8 @@ class OpenIDConnectProviderTest extends \PHPUnit_Framework_TestCase ...@@ -14,7 +14,8 @@ class OpenIDConnectProviderTest extends \PHPUnit_Framework_TestCase
putenv('SIMPLESAMLPHP_CONFIG_DIR=' . dirname(dirname(__DIR__)) . '/config'); putenv('SIMPLESAMLPHP_CONFIG_DIR=' . dirname(dirname(__DIR__)) . '/config');
} }
public function idTokenErrorDataProvider() { public function idTokenErrorDataProvider()
{
return [ return [
[ [
'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Im15a2V5In0.eyJzdWIiOiIxMjM0NTY3ODkwIiwiYXVkIjoiZXZpbCBjbGllbnQgaWQiLCJpYXQiOjE1MTYyMzkwMjIsImlzcyI6Im5pY2VpZHAifQ.T4JQmtmeES1r6On0KnBdJC3f7eFTPd8x_B5EM9c43RXaZHWaq_qpdcyyJzEYJ5er5YXe_hjaLmSybv0NqoVVfg', 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Im15a2V5In0.eyJzdWIiOiIxMjM0NTY3ODkwIiwiYXVkIjoiZXZpbCBjbGllbnQgaWQiLCJpYXQiOjE1MTYyMzkwMjIsImlzcyI6Im5pY2VpZHAifQ.T4JQmtmeES1r6On0KnBdJC3f7eFTPd8x_B5EM9c43RXaZHWaq_qpdcyyJzEYJ5er5YXe_hjaLmSybv0NqoVVfg',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment