Laravel SAML (laravel-saml2) - Config Issues
I'm trying to get SSO working on an application, first time doing anything with this type of thing and falling at first hurdle.
Having some basic issues getting started here. Not totally sure where I am going wrong.
Trying to use https://github.com/aacotroneo/laravel-saml2; Running Laravel 5.4 on a development WAMPserver; installed the package fine, added provider and alias information to config/app.php
as per all instructions.
If I try to publish the config file, I get no action, no error, just "Publishing Complete" in Composer.
I can copy the saml2_settings.php
file to the config directory from the provider directory, and set the parameters there instead, however, no routes work - trying to get the metadata via /saml2/metadata
URL just gives me a 404.
Any ideas - new to SAML but this seems just like a standard installation issue.
php laravel laravel-5 wampserver saml
add a comment |
I'm trying to get SSO working on an application, first time doing anything with this type of thing and falling at first hurdle.
Having some basic issues getting started here. Not totally sure where I am going wrong.
Trying to use https://github.com/aacotroneo/laravel-saml2; Running Laravel 5.4 on a development WAMPserver; installed the package fine, added provider and alias information to config/app.php
as per all instructions.
If I try to publish the config file, I get no action, no error, just "Publishing Complete" in Composer.
I can copy the saml2_settings.php
file to the config directory from the provider directory, and set the parameters there instead, however, no routes work - trying to get the metadata via /saml2/metadata
URL just gives me a 404.
Any ideas - new to SAML but this seems just like a standard installation issue.
php laravel laravel-5 wampserver saml
Did you startup your laravel server e.g withphp artisan serve
I am using Laravel 5.4 and this library works perfectly. I'll try a fresh L5.4 installation and get back to you if something has changed.
– Oluwatobi Samuel Omisakin
Nov 14 '18 at 7:41
I just followed the instruction using Laravel 5.4 and I was able to retrieve the metadata atmyapp/saml2/metadata
without changing anything on theconfig/saml2_settings.php
. You should check again if you're not doing anything wrong
– Oluwatobi Samuel Omisakin
Nov 14 '18 at 8:16
1
After going through everything, seems that I just needed to run composer dump-autoload, as things had not registered correctly. Stupid mistake
– Nicko Brooko
Nov 14 '18 at 14:55
add a comment |
I'm trying to get SSO working on an application, first time doing anything with this type of thing and falling at first hurdle.
Having some basic issues getting started here. Not totally sure where I am going wrong.
Trying to use https://github.com/aacotroneo/laravel-saml2; Running Laravel 5.4 on a development WAMPserver; installed the package fine, added provider and alias information to config/app.php
as per all instructions.
If I try to publish the config file, I get no action, no error, just "Publishing Complete" in Composer.
I can copy the saml2_settings.php
file to the config directory from the provider directory, and set the parameters there instead, however, no routes work - trying to get the metadata via /saml2/metadata
URL just gives me a 404.
Any ideas - new to SAML but this seems just like a standard installation issue.
php laravel laravel-5 wampserver saml
I'm trying to get SSO working on an application, first time doing anything with this type of thing and falling at first hurdle.
Having some basic issues getting started here. Not totally sure where I am going wrong.
Trying to use https://github.com/aacotroneo/laravel-saml2; Running Laravel 5.4 on a development WAMPserver; installed the package fine, added provider and alias information to config/app.php
as per all instructions.
If I try to publish the config file, I get no action, no error, just "Publishing Complete" in Composer.
I can copy the saml2_settings.php
file to the config directory from the provider directory, and set the parameters there instead, however, no routes work - trying to get the metadata via /saml2/metadata
URL just gives me a 404.
Any ideas - new to SAML but this seems just like a standard installation issue.
php laravel laravel-5 wampserver saml
php laravel laravel-5 wampserver saml
edited Nov 13 '18 at 13:52
MrWhite
12.4k33160
12.4k33160
asked Nov 13 '18 at 11:54
Nicko BrookoNicko Brooko
12618
12618
Did you startup your laravel server e.g withphp artisan serve
I am using Laravel 5.4 and this library works perfectly. I'll try a fresh L5.4 installation and get back to you if something has changed.
– Oluwatobi Samuel Omisakin
Nov 14 '18 at 7:41
I just followed the instruction using Laravel 5.4 and I was able to retrieve the metadata atmyapp/saml2/metadata
without changing anything on theconfig/saml2_settings.php
. You should check again if you're not doing anything wrong
– Oluwatobi Samuel Omisakin
Nov 14 '18 at 8:16
1
After going through everything, seems that I just needed to run composer dump-autoload, as things had not registered correctly. Stupid mistake
– Nicko Brooko
Nov 14 '18 at 14:55
add a comment |
Did you startup your laravel server e.g withphp artisan serve
I am using Laravel 5.4 and this library works perfectly. I'll try a fresh L5.4 installation and get back to you if something has changed.
– Oluwatobi Samuel Omisakin
Nov 14 '18 at 7:41
I just followed the instruction using Laravel 5.4 and I was able to retrieve the metadata atmyapp/saml2/metadata
without changing anything on theconfig/saml2_settings.php
. You should check again if you're not doing anything wrong
– Oluwatobi Samuel Omisakin
Nov 14 '18 at 8:16
1
After going through everything, seems that I just needed to run composer dump-autoload, as things had not registered correctly. Stupid mistake
– Nicko Brooko
Nov 14 '18 at 14:55
Did you startup your laravel server e.g with
php artisan serve
I am using Laravel 5.4 and this library works perfectly. I'll try a fresh L5.4 installation and get back to you if something has changed.– Oluwatobi Samuel Omisakin
Nov 14 '18 at 7:41
Did you startup your laravel server e.g with
php artisan serve
I am using Laravel 5.4 and this library works perfectly. I'll try a fresh L5.4 installation and get back to you if something has changed.– Oluwatobi Samuel Omisakin
Nov 14 '18 at 7:41
I just followed the instruction using Laravel 5.4 and I was able to retrieve the metadata at
myapp/saml2/metadata
without changing anything on the config/saml2_settings.php
. You should check again if you're not doing anything wrong– Oluwatobi Samuel Omisakin
Nov 14 '18 at 8:16
I just followed the instruction using Laravel 5.4 and I was able to retrieve the metadata at
myapp/saml2/metadata
without changing anything on the config/saml2_settings.php
. You should check again if you're not doing anything wrong– Oluwatobi Samuel Omisakin
Nov 14 '18 at 8:16
1
1
After going through everything, seems that I just needed to run composer dump-autoload, as things had not registered correctly. Stupid mistake
– Nicko Brooko
Nov 14 '18 at 14:55
After going through everything, seems that I just needed to run composer dump-autoload, as things had not registered correctly. Stupid mistake
– Nicko Brooko
Nov 14 '18 at 14:55
add a comment |
1 Answer
1
active
oldest
votes
1) You need to add SAML2_IDP_HOST in env
2) Your url must contan prefix 'routesPrefix' => '/saml2', so your routes looks like below,
/**
* If 'useRoutes' is set to true, the package defines five new routes:
*
* Method | URI | Name
* -------|--------------------------|------------------
* POST | {routesPrefix}/acs | saml_acs
* GET | {routesPrefix}/login | saml_login
* GET | {routesPrefix}/logout | saml_logout
* GET | {routesPrefix}/metadata | saml_metadata
* GET | {routesPrefix}/sls | saml_sls
*/
I have the routes prefix set 'useRoutes' => true, 'routesPrefix' => '/saml2', and URL I am using is localhost/public/saml2/metadata Do I need to use anything other than the pre-set example SAML2_IDP_HOST in the saml2_settings.php file just to access the Metadata route - seems to me something not working with the actual routes to start with.
– Nicko Brooko
Nov 13 '18 at 15:41
Do you define in route as well?
– Madhusudan
Nov 14 '18 at 6:02
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53280511%2flaravel-saml-laravel-saml2-config-issues%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
1) You need to add SAML2_IDP_HOST in env
2) Your url must contan prefix 'routesPrefix' => '/saml2', so your routes looks like below,
/**
* If 'useRoutes' is set to true, the package defines five new routes:
*
* Method | URI | Name
* -------|--------------------------|------------------
* POST | {routesPrefix}/acs | saml_acs
* GET | {routesPrefix}/login | saml_login
* GET | {routesPrefix}/logout | saml_logout
* GET | {routesPrefix}/metadata | saml_metadata
* GET | {routesPrefix}/sls | saml_sls
*/
I have the routes prefix set 'useRoutes' => true, 'routesPrefix' => '/saml2', and URL I am using is localhost/public/saml2/metadata Do I need to use anything other than the pre-set example SAML2_IDP_HOST in the saml2_settings.php file just to access the Metadata route - seems to me something not working with the actual routes to start with.
– Nicko Brooko
Nov 13 '18 at 15:41
Do you define in route as well?
– Madhusudan
Nov 14 '18 at 6:02
add a comment |
1) You need to add SAML2_IDP_HOST in env
2) Your url must contan prefix 'routesPrefix' => '/saml2', so your routes looks like below,
/**
* If 'useRoutes' is set to true, the package defines five new routes:
*
* Method | URI | Name
* -------|--------------------------|------------------
* POST | {routesPrefix}/acs | saml_acs
* GET | {routesPrefix}/login | saml_login
* GET | {routesPrefix}/logout | saml_logout
* GET | {routesPrefix}/metadata | saml_metadata
* GET | {routesPrefix}/sls | saml_sls
*/
I have the routes prefix set 'useRoutes' => true, 'routesPrefix' => '/saml2', and URL I am using is localhost/public/saml2/metadata Do I need to use anything other than the pre-set example SAML2_IDP_HOST in the saml2_settings.php file just to access the Metadata route - seems to me something not working with the actual routes to start with.
– Nicko Brooko
Nov 13 '18 at 15:41
Do you define in route as well?
– Madhusudan
Nov 14 '18 at 6:02
add a comment |
1) You need to add SAML2_IDP_HOST in env
2) Your url must contan prefix 'routesPrefix' => '/saml2', so your routes looks like below,
/**
* If 'useRoutes' is set to true, the package defines five new routes:
*
* Method | URI | Name
* -------|--------------------------|------------------
* POST | {routesPrefix}/acs | saml_acs
* GET | {routesPrefix}/login | saml_login
* GET | {routesPrefix}/logout | saml_logout
* GET | {routesPrefix}/metadata | saml_metadata
* GET | {routesPrefix}/sls | saml_sls
*/
1) You need to add SAML2_IDP_HOST in env
2) Your url must contan prefix 'routesPrefix' => '/saml2', so your routes looks like below,
/**
* If 'useRoutes' is set to true, the package defines five new routes:
*
* Method | URI | Name
* -------|--------------------------|------------------
* POST | {routesPrefix}/acs | saml_acs
* GET | {routesPrefix}/login | saml_login
* GET | {routesPrefix}/logout | saml_logout
* GET | {routesPrefix}/metadata | saml_metadata
* GET | {routesPrefix}/sls | saml_sls
*/
answered Nov 13 '18 at 12:03
MadhusudanMadhusudan
368111
368111
I have the routes prefix set 'useRoutes' => true, 'routesPrefix' => '/saml2', and URL I am using is localhost/public/saml2/metadata Do I need to use anything other than the pre-set example SAML2_IDP_HOST in the saml2_settings.php file just to access the Metadata route - seems to me something not working with the actual routes to start with.
– Nicko Brooko
Nov 13 '18 at 15:41
Do you define in route as well?
– Madhusudan
Nov 14 '18 at 6:02
add a comment |
I have the routes prefix set 'useRoutes' => true, 'routesPrefix' => '/saml2', and URL I am using is localhost/public/saml2/metadata Do I need to use anything other than the pre-set example SAML2_IDP_HOST in the saml2_settings.php file just to access the Metadata route - seems to me something not working with the actual routes to start with.
– Nicko Brooko
Nov 13 '18 at 15:41
Do you define in route as well?
– Madhusudan
Nov 14 '18 at 6:02
I have the routes prefix set 'useRoutes' => true, 'routesPrefix' => '/saml2', and URL I am using is localhost/public/saml2/metadata Do I need to use anything other than the pre-set example SAML2_IDP_HOST in the saml2_settings.php file just to access the Metadata route - seems to me something not working with the actual routes to start with.
– Nicko Brooko
Nov 13 '18 at 15:41
I have the routes prefix set 'useRoutes' => true, 'routesPrefix' => '/saml2', and URL I am using is localhost/public/saml2/metadata Do I need to use anything other than the pre-set example SAML2_IDP_HOST in the saml2_settings.php file just to access the Metadata route - seems to me something not working with the actual routes to start with.
– Nicko Brooko
Nov 13 '18 at 15:41
Do you define in route as well?
– Madhusudan
Nov 14 '18 at 6:02
Do you define in route as well?
– Madhusudan
Nov 14 '18 at 6:02
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53280511%2flaravel-saml-laravel-saml2-config-issues%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you startup your laravel server e.g with
php artisan serve
I am using Laravel 5.4 and this library works perfectly. I'll try a fresh L5.4 installation and get back to you if something has changed.– Oluwatobi Samuel Omisakin
Nov 14 '18 at 7:41
I just followed the instruction using Laravel 5.4 and I was able to retrieve the metadata at
myapp/saml2/metadata
without changing anything on theconfig/saml2_settings.php
. You should check again if you're not doing anything wrong– Oluwatobi Samuel Omisakin
Nov 14 '18 at 8:16
1
After going through everything, seems that I just needed to run composer dump-autoload, as things had not registered correctly. Stupid mistake
– Nicko Brooko
Nov 14 '18 at 14:55