{"action":"created","issue":{"url":"https://api.github.com/repos/simplesamlphp/simplesamlphp/issues/880","repository_url":"https://api.github.com/repos/simplesamlphp/simplesamlphp","labels_url":"https://api.github.com/repos/simplesamlphp/simplesamlphp/issues/880/labels{/name}","comments_url":"https://api.github.com/repos/simplesamlphp/simplesamlphp/issues/880/comments","events_url":"https://api.github.com/repos/simplesamlphp/simplesamlphp/issues/880/events","html_url":"https://github.com/simplesamlphp/simplesamlphp/issues/880","id":337263502,"node_id":"MDU6SXNzdWUzMzcyNjM1MDI=","number":880,"title":"baseurlpath being ignored","user":{"login":"s--g","id":3196913,"node_id":"MDQ6VXNlcjMxOTY5MTM=","avatar_url":"https://avatars2.githubusercontent.com/u/3196913?v=4","gravatar_id":"","url":"https://api.github.com/users/s--g","html_url":"https://github.com/s--g","followers_url":"https://api.github.com/users/s--g/followers","following_url":"https://api.github.com/users/s--g/following{/other_user}","gists_url":"https://api.github.com/users/s--g/gists{/gist_id}","starred_url":"https://api.github.com/users/s--g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s--g/subscriptions","organizations_url":"https://api.github.com/users/s--g/orgs","repos_url":"https://api.github.com/users/s--g/repos","events_url":"https://api.github.com/users/s--g/events{/privacy}","received_events_url":"https://api.github.com/users/s--g/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-01T04:52:45Z","updated_at":"2018-07-02T10:14:25Z","closed_at":"2018-07-02T07:25:24Z","author_association":"NONE","body":"When invoking \\SimpleSAML\\Auth\\Simple::requireAuth from an external application such as in the following example:\r\n\r\n```\r\n$as = new \\SimpleSAML\\Auth\\Simple($var);\r\n$as->requireAuth();\r\n```\r\n\r\nthe following webpage is presented to the user:\r\n\r\nhttps://github.com/simplesamlphp/simplesamlphp/blob/57df7b25fa558531c1e76aa686c5daec199b3fdc/templates/post.php\r\n\r\nHowever the value of ```$this->data['baseurlpath'];``` is empty, even though a value is specified in config.php. Due to this, because the code is invoked from an external app, the references to the css and js file end up being relative to the application URL, which is invalid.\r\n\r\nThe effect of this is that those files can't be loaded and the user ends up with a blank page with a \"Submit\" button because the auto-submission code is in the JavaScript file that failed to load.\r\n\r\nWhy is ```$this->data['baseurlpath'];``` empty, even though a valid full URL is specified in config.php?\r\n\r\nAs a side note, why even have those as separate files?  Each one basically contains a one-liner.  It would be much more efficient to just embed that js and css directly in the webpage.  This would remove two whole HTTP requests, speeding up the sign in process.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/simplesamlphp/simplesamlphp/issues/comments/401750228","html_url":"https://github.com/simplesamlphp/simplesamlphp/issues/880#issuecomment-401750228","issue_url":"https://api.github.com/repos/simplesamlphp/simplesamlphp/issues/880","id":401750228,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTc1MDIyOA==","user":{"login":"s--g","id":3196913,"node_id":"MDQ6VXNlcjMxOTY5MTM=","avatar_url":"https://avatars2.githubusercontent.com/u/3196913?v=4","gravatar_id":"","url":"https://api.github.com/users/s--g","html_url":"https://github.com/s--g","followers_url":"https://api.github.com/users/s--g/followers","following_url":"https://api.github.com/users/s--g/following{/other_user}","gists_url":"https://api.github.com/users/s--g/gists{/gist_id}","starred_url":"https://api.github.com/users/s--g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s--g/subscriptions","organizations_url":"https://api.github.com/users/s--g/orgs","repos_url":"https://api.github.com/users/s--g/repos","events_url":"https://api.github.com/users/s--g/events{/privacy}","received_events_url":"https://api.github.com/users/s--g/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T10:14:25Z","updated_at":"2018-07-02T10:14:25Z","author_association":"NONE","body":"Hello Jaime,\r\n\r\nMany thanks for the reply.\r\n\r\n> A valid full URL is https://github.com/, for example, but the resulting baseurlpath variable in the template would be empty. If you configure https://github.com/simplesamlphp/, the variable would hold the value simplesamlphp/. \r\n\r\nHerein lies the problem.  Our application is hosted on a different sub-domain than our SimpleSAMLphp installation.  The code that I provided above is invoked by our application on its own sub-domain (eg: \"https://app.example.com/\").  We populate the full and correct SimpleSAMLphp domain name into the ```baseurlpath``` variable within config.php (eg: \"https://sso.example.com/\") but as you point out, it's ignoring that and only taking any path that appears after the domain (of which there is none in our case).  This explains why the variable in the template is blank, however I thought the purpose of being able to specify a fully qualified domain in the baseurl variable in config.php was precisely for the situation that we have?\r\n"}}
{"actor":{"display_login":"s--g"}}