Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alfakhori
M4labplatform
Commits
3ccd3526
Commit
3ccd3526
authored
Jun 18, 2020
by
Rosanny Sihombing
Browse files
configure index route
parent
45b7582e
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/routes.js
View file @
3ccd3526
...
...
@@ -27,7 +27,6 @@ module.exports = function (app, config, passport) {
// Service Provider Certificate
privateCert
:
fs
.
readFileSync
(
__dirname
+
'
/cert/key.pem
'
,
'
utf8
'
),
//privateCert: fs.readFileSync(__dirname + '/cert/cert.pem', 'utf8'),
// Identity Provider's public key
cert
:
fs
.
readFileSync
(
__dirname
+
'
/cert/cert_idp.pem
'
,
'
utf8
'
),
...
...
@@ -49,6 +48,20 @@ module.exports = function (app, config, passport) {
passport
.
use
(
samlStrategy
);
// ============================
app
.
get
(
'
/
'
,
function
(
req
,
res
)
{
if
(
req
.
isAuthenticated
())
{
res
.
render
(
'
index
'
,
{
userLogin
:
true
});
}
else
{
res
.
render
(
'
index
'
,
{
userLogin
:
false
});
}
});
app
.
get
(
'
/login
'
,
passport
.
authenticate
(
config
.
passport
.
strategy
,
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment