Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uber5/oauth2-oidc
Authentication Provider in NodeJS, implementing OAuth2 and OpenID Connect (partly)
https://github.com/uber5/oauth2-oidc
Last synced: 6 days ago
JSON representation
Authentication Provider in NodeJS, implementing OAuth2 and OpenID Connect (partly)
- Host: GitHub
- URL: https://github.com/uber5/oauth2-oidc
- Owner: Uber5
- License: mit
- Created: 2015-11-27T05:43:41.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-09T14:31:29.000Z (about 8 years ago)
- Last Synced: 2024-09-27T21:35:09.316Z (about 2 months ago)
- Language: JavaScript
- Size: 150 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://travis-ci.org/Uber5/oauth2-oidc)
# Development
## Setup
Assuming you've got a NodeJS environment ready:
```
npm install
```## Run Specs
```
npm test
```## Run Specs Continuously
```
npm run watch
```## Debug Specs
Run the specs with `--debug-brk` to make node wait for the debugger to attach:
```
node --debug-brk ./node_modules/jasmine/bin/jasmine.js
```Run `node-inspector`:
```
./node_modules/.bin/node-inspector
```... (does not work at the moment... why?)
# Testing
The example provider can be run with a REPL:
```
WITH_REPL=1 node examples/provider.js
```Within the REPL, the following will be in the context: `provider`, `ontology`, `server`
This gives access to anything persisted like this:
```
ontology.collections.client.findOne({ id: 1 }).then((c) => { console.log('c', c) })
```## Persistence
The example provider uses in-memory "persistence" by default. MongoDB can be
used instead by providing a url in environment variable `MONGO_URL` like so:```
MONGO_URL=mongodb://localhost/oauth2-oidc-provider node examples/provider.js
```# License
Licensed under the [MIT License](./LICENSE.txt).