@@ -41,11 +41,11 @@ class OAuth2Authenticator
4141 * Initializes the OAuth2 authentication process by setting up session data,
4242 * request parameters, allowed URIs, and other necessary configurations.
4343 *
44+ * @param ServerRequestInterface $request
4445 * @param array &$sessions
4546 * @param string $resolved_ip
4647 * @param string $web_address
4748 * @param int $http_port
48- * @param ServerRequestInterface $request
4949 * @param string $client_id
5050 * @param string $client_secret
5151 * @param string $endpoint_name
@@ -61,8 +61,8 @@ public function __construct(
6161 int $ http_port ,
6262 protected string $ client_id ,
6363 protected string $ client_secret ,
64- protected string $ endpoint_name = ' ss14wa ' ,
65- protected string $ scope = ' openid profile email '
64+ protected string $ endpoint_name ,
65+ protected string $ scope
6666 ) {
6767 if (! $ request instanceof ServerRequestInterface) {
6868 throw new \RuntimeException ('String requests are not supported. ' );
@@ -134,8 +134,9 @@ public function login(
134134
135135 if (!in_array ($ redirect_uri = $ redirect_uri ?? $ this ->default_redirect , $ this ->allowed_uri )) {
136136 $ response = Response::STATUS_FOUND ;
137- $ headers = ['Location ' => $ this ->allowed_uri [0 ] . ' ?login ' ];
137+ $ headers = ['Location ' => "{ $ this ->endpoint_name } / { $ this -> allowed_uri [0 ]} ?login " ];
138138 $ body = '' ;
139+ var_dump ($ headers );
139140 return ;
140141 }
141142
0 commit comments