@@ -50,17 +50,36 @@ public function __construct(IAuthService $auth_service, ISecurityContextService
5050 * @return int|string|null
5151 */
5252 private function getLoginHint (){
53+
5354 $ ctx = $ this ->security_context_service ->get ();
5455 $ Login_hint = null ;
5556 if (!is_null ($ ctx )) {
5657 $ Login_hint = $ ctx ->getRequestedUserId ();
5758 }
5859
59- if (is_null ($ Login_hint )){
60+ if (empty ($ Login_hint )){
61+ Log::debug
62+ (
63+ sprintf
64+ (
65+ "LoginHintProcessStrategy::getLoginHint no login hint in security context, trying to get from QS "
66+ )
67+ );
68+
6069 if (Request::has (OAuth2Protocol::OAuth2Protocol_LoginHint)) {
6170 $ login_hint = Request::query (OAuth2Protocol::OAuth2Protocol_LoginHint);
62- if (!EmailUtils::isValidEmail ($ login_hint ))
71+ Log::debug (sprintf ("LoginHintProcessStrategy::getLoginHint login_hint %s from QS " , $ login_hint ));
72+ if (!EmailUtils::isValidEmail ($ login_hint )) {
73+ Log::debug
74+ (
75+ sprintf
76+ (
77+ "LoginHintProcessStrategy::getLoginHint login_hint %s is not a valid email " ,
78+ $ login_hint
79+ )
80+ );
6381 $ login_hint = null ;
82+ }
6483 }
6584 }
6685
@@ -69,6 +88,7 @@ private function getLoginHint(){
6988
7089 public function process ():void {
7190 $ login_hint = $ this ->getLoginHint ();
91+ Log::debug (sprintf ("LoginHintProcessStrategy::process login_hint %s " , $ login_hint ));
7292 // login hint processing
7393 Session::forget (['username ' , 'user_fullname ' , 'user_pic ' , 'user_verified ' ]);
7494 if (!is_null ($ login_hint )) {
0 commit comments