define the file that will store users database for the saml Idp

This commit is contained in:
Mohamed ABDELLANI 2020-06-02 20:36:26 +01:00
parent f44af016aa
commit 37eada4de0
3 changed files with 29 additions and 3 deletions

View File

@ -51,7 +51,10 @@ const fields = [
name="saml-enabled"
id="saml-enabled"
/>
<span id="saml-enabled-slider" className="TogglerBtn-slider round"></span>
<span
id="saml-enabled-slider"
className="TogglerBtn-slider round"
></span>
</label>
),
},

View File

@ -291,8 +291,8 @@ router.get('/sso/login', async function(req, res) {
sso_login_url: samlSsoUrl,
});
sp.create_login_request_url(idp, {}, function(err, login_url) {
if (err != null) return sendErrorResponse(req, res, error);
sp.create_login_request_url(idp, {}, function(error, login_url) {
if (error != null) return sendErrorResponse(req, res, error);
return sendItemResponse(req, res, { url: login_url });
});
} catch (error) {

23
saml/users.php Normal file
View File

@ -0,0 +1,23 @@
<?php
$config = array(
'admin' => array(
'core:AdminPassword',
),
'example-userpass' => array(
'exampleauth:UserPass',
'user1:user1pass' => array(
'uid' => array('1'),
'eduPersonAffiliation' => array('group1'),
'email' => 'user1@tests.hackerbay.io',
),
'user2:user2pass' => array(
'uid' => array('2'),
'eduPersonAffiliation' => array('group2'),
'email' => 'user2@tests.hackerbay.io',
),
),
);