Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
J
jwtfed-provider
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ASM
jwtfed-provider
Commits
491e6219
Commit
491e6219
authored
Aug 07, 2018
by
Andreas Åkre Solberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor update
parent
170355f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
server.js
server.js
+7
-15
No files found.
server.js
View file @
491e6219
...
...
@@ -4,33 +4,25 @@ const Provider = require('oidc-provider');
const
assert
=
require
(
'
assert
'
)
const
configuration
=
{
// ... see available options /docs/configuration.md
};
const
clients
=
[{
client_id
:
'
foo
'
,
client_secret
:
'
bar
'
,
redirect_uris
:
[
'
http://lvh.me/cb
'
]
}];
}
assert
(
process
.
env
.
SECURE_KEY
,
'
process.env.SECURE_KEY missing, run `heroku addons:create securekey`
'
)
assert
.
equal
(
process
.
env
.
SECURE_KEY
.
split
(
'
,
'
).
length
,
2
,
'
process.env.SECURE_KEY format invalid
'
)
const
oidc
=
new
Provider
(
'
http://localhost:3000
'
,
configuration
)
;
const
oidc
=
new
Provider
(
'
http://localhost:3000
'
,
configuration
)
(
async
()
=>
{
await
oidc
.
initialize
({
adapter
:
JWTFedAdapter
})
;
await
oidc
.
initialize
({
adapter
:
JWTFedAdapter
})
// oidc.callback => express/nodejs style application callback (req, res)
// oidc.app => koa2.x application
oidc
.
listen
(
3000
);
oidc
.
keys
=
process
.
env
.
SECURE_KEY
.
split
(
'
,
'
)
;
console
.
log
(
'
oidc-provider listening on port 3000, check http://localhost:3000/.well-known/openid-configuration
'
)
;
oidc
.
keys
=
process
.
env
.
SECURE_KEY
.
split
(
'
,
'
)
console
.
log
(
'
oidc-provider listening on port 3000, check http://localhost:3000/.well-known/openid-configuration
'
)
})().
catch
((
err
)
=>
{
console
.
error
(
err
)
;
process
.
exitCode
=
1
;
console
.
error
(
err
)
process
.
exitCode
=
1
});
// http://localhost:3000/auth?client_id=foo&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fcallback&scope=openid&state=af0ifjsldkj&nonce=n-0S6_WzA2Mj&response_type=code
// http://localhost:3000/auth?/auth?client_id=foo&response_type=code&scope=openid
// http://localhost:3000/auth?client_id=foo&response_type=code&scope=openid
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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