Skip to content
Snippets Groups Projects
Commit 5ce285af authored by Francisco Borges Aurindo Barros's avatar Francisco Borges Aurindo Barros
Browse files

new patch test

parent e2f3ecf8
Branches
No related tags found
No related merge requests found
......@@ -361,7 +361,9 @@
},
"drupal/openid_connect": {
"OIDC roles mapping from JWT https://www.drupal.org/project/openid_connect/issues/3166508": "patches/openid_connect-3166508-role-mapping.patch",
"OIDC autologin (skip Drupal login page) https://www.drupal.org/project/openid_connect/issues/3011413": "patches/openid_connect-3011413-autologin.patch"
"OIDC autologin (skip Drupal login page) https://www.drupal.org/project/openid_connect/issues/3011413": "patches/openid_connect-3011413-autologin.patch",
"OIDC redirect URL after login": "patches/openid_connect-redirect-url.2921477-25.patch",
"OIDC repatch ": "patches/new_autologin.patch"
},
"__comments__": {
}
......
--- openid_connect_orig/src/EventSubscriber/OpenIDConnectAutoLogin.php 2021-07-12 17:35:12.000000001 +0200
+++ openid_connect/src/EventSubscriber/OpenIDConnectAutoLogin.php 2021-07-12 18:12:14.000000001 +0200
@@ -91,17 +91,21 @@
*/
public function login(GetResponseEvent $event) {
// Get current request.
+ Drupal::logger('oidc_debug')->warning("Starting Login AutoLogin...");
$request = $event->getRequest();
// Check if user is anonymous and login or register page was requested.
if ($this->isAutostartEnabled() && $this->currentUser->isAnonymous() && $this->isLoginRequested($request)) {
+ Drupal::logger('oidc_debug')->warning("Login Autologin, user anonymous and login is requested");
// If there is no login errors and login process is not in progress
// and openid_connect_bypass is not provided, then start login process.
if (!$this->hasErrors() && !$this->bypassAutoLogin($request)) {
+ Drupal::logger('oidc_debug')->warning("Login Autologin, no errors and no bypassAutoLogin");
// Start OpenID Connect login process.
Drupal::service('openid_connect.session')->saveDestination();
$_SESSION['openid_connect_op'] = 'login';
$client = $this->getClient();
if ($client) {
+ Drupal::logger('oidc_debug')->warning("Login Autologin, client exists");
$response = $client->authorize();
// Redirect to given response.
$event->setResponse($response);
@@ -229,6 +233,7 @@
* TRUE if regular Drupal login process should start, FALSE otherwise.
*/
protected function bypassAutoLogin(Request $request) {
+ Drupal::logger('oidc_debug')->warning("bypassAutoLogin : " . $request->query->has('showcore'));
return $request->query->has('showcore');
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment