Skip to content
Draft
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
13 changes: 13 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
"next/babel"
],
"plugins": [
[
"styled-components",
{
"ssr": true
}
]
]
}
7 changes: 0 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,5 @@ root = true
[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,ts}]
indent_style = space
indent_size = 4

# Matches the exact files either package.json or .travis.yml
[*.{yml,yaml}]
indent_style = space
indent_size = 2
105 changes: 4 additions & 101 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,104 +1,7 @@
# Client Metadata Options
# see complete set of options here:
# https://github.com/panva/node-openid-client/blob/master/docs/README.md#new-clientmetadata-jwks-options
# All options are supported via environment variables with the prefix of OPENID_${propertyname.toUpperCase()}
# Example: client_id would be OPENID_CLIENT_ID
OPENID_ISSUER=
OPENID_CLIENT_ID=
OPENID_CLIENT_SECRET=
OPENID_REDIRECT_URIS=

# Session Options
OPENID_REDIRECT_URI=
OPENID_SESSION_NAME=
OPENID_SESSION_SAME_SITE=
# Session Keys are required
# Examples:
# OPENID_SESSION_KEYS= asdfington
# OPENID_SESSION_KEYS= asdfington,fdsaington
OPENID_SESSION_KEYS=

# Client Server Options
OPENID_SIGNIN_PATH=
OPENID_CALLBACK_PATH=
OPENID_PROCESS_CALLBACK_PATH=
OPENID_SIGNOUT_PATH=
OPENID_USER_INFO_PATH=
OPENID_ERROR_PAGE_PATH=
# Discovery Endpoint is required
# see discription of use here:
# https://github.com/panva/node-openid-client/blob/master/docs/README.md#issuerdiscoverissuer
# Examples:
# https://samples.auth0.com/
# https://samples.auth0.com/.well-known/openid-configuration
OPENID_DISCOVERY_ENDPOINT=
# Override default openid-client scope with space delimited value(s)
# Examples:
# api://azure-ad-app-id/api_access
# api://azure-ad-app-id/api_access openid profile
OPENID_SCOPE=

# Optional flag to enable PKCE Option
OPENID_ENABLE_PKCE=

# OAuth2 Options
ENABLE_OAUTH2=
OAUTH2_AUTH_ENDPOINT=
OAUTH2_TOKEN_ENDPOINT=
OAUTH2_USERINFO_ENDPOINT=

# A flag to enable OpenID Request Listener Events
OPENID_REQUEST_LISTENER_EMIT_EVENTS=

# Proxy Options
# Proxy Paths is a csv of path values the openid web app will call
# Examples:
# /proxy
# /api,/api2
OPENID_PROXY_PATHS=
# Proxy Hosts is a csv of hosts that will via the proxy path of the same index
# Examples:
# http://localhost:3005
# http://localhost:3000,http://localhost:3005
OPENID_PROXY_HOSTS=
# Proxy exclude cookie is a csv of boolean flags indicating whether or not to exclude the cookie header from the wep app request
# Examples:
# false
# false,true
OPENID_PROXY_EXCLUDE_COOKIE=

# Exclude all origin headers. Overrides OPENID_PROXY_EXCLUDE_COOKIE if true
# Examples:
# false
# false,true
OPENID_PROXY_EXCLUDE_ORIGIN_HEADERS=

# Optional csv of boolean flags indicating to use id_token instead of access token for proxy requests
OPENID_PROXY_USE_ID_TOKEN=

# Logger Options
# NOTE: to override all these settings, simply overwrite options.loggerOptions within server setup
# customize basic options within the default pino logger
# see pino log-level for possible values:
# http://getpino.io/#/docs/api?id=level-string
OPENID_LOG_LEVEL=
# see pino uselevellabels-boolean for possible values:
http://getpino.io/#/docs/api?id=uselevellabels-boolean
OPENID_LOG_USE_LEVEL_LABELS=
# see pino name-string for possible values:
# http://getpino.io/#/docs/api?id=name-string
OPENID_LOG_NAME=
# see pino-pretty for possible values:
# https://github.com/pinojs/pino-pretty#options
# this value is treated as boolean with default behaivor
# prettyPrint: process.env.NODE_ENV !== 'production'
# set options.loggerOptions.prettyPrint within server setup to customize if needed
OPENID_LOG_PRETTY=

# Required if the application is using the OPENID_SIGNOUT_PATH settings to allow the user to explicitly sign out
# of the application
OPENID_SIGNED_OUT_PAGE=

# Optional comma separated list of secured pages
# example:
# /dashboard
# /dashboard,/editor
OPENID_SECURED_PATHS=
OPENID_SESSION_KEY=
OPENID_SERVER_PORT=
8 changes: 8 additions & 0 deletions .envrc.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export OPENID_ISSUER=
export OPENID_CLIENT_ID=
export OPENID_CLIENT_SECRET=
export OPENID_REDIRECT_URI=http://localhost:8080/openid/callback
export OPENID_SESSION_NAME=ocs-demo-session
export OPENID_SESSION_KEY=
export OPENID_SERVER_PORT=8080
export OPENID_HARNESS_API_PORT=3000
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
docs
rig
node_modules
63 changes: 63 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"parser": "@typescript-eslint/parser",
"env": {
"es6": true
},
"plugins": ["prettier", "promise", "sonarjs", "unicorn"],
"extends": [
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:unicorn/recommended",
"plugin:sonarjs/recommended",
"plugin:promise/recommended"
],
"rules": {
"prettier/prettier": [
"error",
{
"arrowParens": "avoid",
"bracketSpacing": false,
"printWidth": 80,
"quoteProps": "consistent",
"semi": false,
"singleQuote": true,
"tabWidth": 4,
"useTabs": false,
"trailingComma": "none"
}
],
"@typescript-eslint/member-delimiter-style": [
0,
{
"multiline": {
"delimiter": "none",
"requireLast": false
},
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}
],
"@typescript-eslint/no-unused-vars": 2,
"@typescript-eslint/explicit-function-return-type": 2,
"@typescript-eslint/no-explicit-any": 2,
"unicorn/prevent-abbreviations": [
"error",
{
"replacements": {
"res": false
}
}
],
"sort-imports": [
"error",
{
"ignoreCase": false,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["all", "single", "multiple", "none"]
}
]
}
}
2 changes: 1 addition & 1 deletion docs/NOTICE.txt → .github/NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ An OpenId Relying Party (RP, Client) application server that abstracts away the

Author(s):
Ryan Sites (@seesharpguy)
William Kurth (@lxghtless)
William Kurth (@lxghtless)
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ci

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn
- run: yarn test
50 changes: 25 additions & 25 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@
name: Node.js Package

on:
release:
types: [created]
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn
- run: yarn test
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn
- run: yarn test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn build
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn build
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
15 changes: 7 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ typings/

# OSX
.DS_Store
node_modules

coverage
harness/app/.next

# compiled server output
dist

examples/nextjs/.next
examples/nextjs/server

examples/static/server

examples/static-gh/server

.envrc
.env

secret-session-key
10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable-self-update-check true
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
33 changes: 33 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Website

This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

```
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Loading