@@ -20,22 +20,21 @@ public function __construct() {
2020 $ this ->authServerConfig = $ this ->createAuthServerConfig ();
2121 $ this ->authServerFactory = (new \Pdsinterop \Solid \Auth \Factory \AuthorizationServerFactory ($ this ->authServerConfig ))->create ();
2222 $ this ->tokenGenerator = (new \Pdsinterop \Solid \Auth \TokenGenerator ($ this ->authServerConfig ));
23-
24- // $this->baseUrl = "https://localhost";
23+ $ this ->baseUrl = isset ($ _ENV ['SERVER_ROOT ' ]) ? $ _ENV ['SERVER_ROOT ' ] : "https://localhost " ;
2524 }
2625
2726 public function getOpenIdEndpoints () {
2827 // FIXME: would be better to base this on the available routes if possible.
29- $ this ->baseUrl = "https://server/ " ; // FIXME: generate proper urls
28+ $ this ->baseUrl = isset ( $ _ENV [ ' SERVER_ROOT ' ]) ? $ _ENV [ ' SERVER_ROOT ' ] : "https://localhost " ;
3029 return [
3130 'issuer ' => $ this ->baseUrl ,
32- 'authorization_endpoint ' => $ this ->baseUrl . "authorize " ,
33- 'jwks_uri ' => $ this ->baseUrl . "jwks " ,
34- "check_session_iframe " => $ this ->baseUrl . "session " ,
35- "end_session_endpoint " => $ this ->baseUrl . "logout " ,
36- "token_endpoint " => $ this ->baseUrl . "token " ,
37- "userinfo_endpoint " => $ this ->baseUrl . "userinfo " ,
38- "registration_endpoint " => $ this ->baseUrl . "register "
31+ 'authorization_endpoint ' => $ this ->baseUrl . "/ authorize " ,
32+ 'jwks_uri ' => $ this ->baseUrl . "/ jwks " ,
33+ "check_session_iframe " => $ this ->baseUrl . "/ session " ,
34+ "end_session_endpoint " => $ this ->baseUrl . "/ logout " ,
35+ "token_endpoint " => $ this ->baseUrl . "/ token " ,
36+ "userinfo_endpoint " => $ this ->baseUrl . "/ userinfo " ,
37+ "registration_endpoint " => $ this ->baseUrl . "/ register " ,
3938 ];
4039 }
4140
@@ -114,7 +113,7 @@ public function checkApproval($clientId) {
114113 }
115114
116115 public function getProfilePage () {
117- return $ this ->baseUrl . "profile/card#me " ; // FIXME: would be better to base this on the available routes if possible.
116+ return $ this ->baseUrl . "/ profile/card#me " ; // FIXME: would be better to base this on the available routes if possible.
118117 }
119118
120119 public function getResponseType () {
0 commit comments