Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"requireCurlyBraces": [
"while",
"do",
"try",
"catch"
],
"requireSpaceAfterKeywords": [
"else",
"while",
"do",
"return",
"try"
],
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpaceBeforeBlockStatements": true,
"requireSpacesInForStatement": true,
"disallowKeywords": [
"with"
],
"requireLineFeedAtFileEnd": true,
"validateLineBreaks": "LF",
"requireSpaceAfterPrefixUnaryOperators": [
"++",
"--"
],
"requireSpaceBetweenArguments": true,
"requireSpaceBeforePostfixUnaryOperators": [
"--"
],
"requireSpaceBeforeBinaryOperators": [
"-",
"=",
"==",
"===",
"!==",
">",
">=",
"<="
],
"requireSpaceAfterBinaryOperators": [
"-",
"=",
"==",
"===",
"!==",
">",
">=",
"<="
],
"disallowSpaceBeforeBinaryOperators": [
"+",
"+",
"/",
"*",
"!=",
"<",
"<"
],
"disallowPaddingNewlinesInBlocks": true,
"validateIndentation": 2,
"disallowSpaceAfterKeywords": [
"if",
"if",
"for",
"for",
"switch",
"switch",
"catch",
"catch"
],
"disallowSpacesInConditionalExpression": {
"beforeAlternate": true
},
"disallowSpaceAfterBinaryOperators": [
"+",
"+",
"/",
"*",
"!=",
"<",
"<"
],
"disallowSpacesInsideObjectBrackets": "all",
"disallowSpacesInsideArrayBrackets": "all",
"disallowSpaceBeforePostfixUnaryOperators": [
"++",
"++"
]
}
18 changes: 18 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"node": true,
"bitwise": true,
"camelcase": false,
"curly": false,
"forin": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
"quotmark": "single",
"undef": true,
"unused": true,
"trailing": true,
"laxcomma": true
}
40 changes: 40 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Steps To Run Example

You must have [Node.js](http://nodejs.org/) and [Redis](http://redis.io/download) installed, and Redis must be running.

1. Fork this repository
2. Clone it, using your username

```
git clone [email protected]:<YOUR_USERNAME>/OpenIDConnect.git
cd OpenIDConnect
```

3. Install Node.js dependencies

```
npm install
cd examples
npm install
```

4. Start server

```
node openid-connect-example.js
```

5. Create user: http://localhost:3001/user/create
6. Register a client: http://localhost:3001/client/register
* Client Key: exampleid
* Redirect URI: http://localhost:3001/test
7. Test an auth flow at http://localhost:3001/test
* Client Key: exampleid
* Scopes: foo
* Follow prompts
- Accept
- Get Token
- Get Resource
- You should see page that is restricted by ```foo``` scope
8. Logout: http://localhost:3001/logout?access_token=YOUR_ACCESS_TOKEN
9. Navigate to http://localhost:3001/user/foo?access_token=YOUR_ACCESS_TOKEN
Loading