Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
4 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
configure index route
parent
45b7582e
sso
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config/routes.js
+14
-1
config/routes.js
with
14 additions
and
1 deletion
+14
-1
config/routes.js
+
14
-
1
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
,
{
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets