noms-digital-studio/iis-mock-sso

Name: iis-mock-sso

Owner: NOMS Digital Studio

Description: Simple node app to stand in for an oauth2 SSO server

Created: 2017-03-18 18:45:13.0

Updated: 2017-03-18 19:02:49.0

Pushed: 2017-06-29 09:28:46.0

Homepage: null

Size: 6

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

iis-mock-sso

Simple node app to stand in for an oauth2 SSO server

Configuration

Edit server.js if need to change

Create user profile in /users. If you wanted, you could create multiple profiles and modify the SSO view to allow selection of a user.

Start Server

Or, if you want interactive login mode, use

Operation

This is a very basic standin for an oauth2 SSO server.

You must configure your app to use the following paths, assuming the default port of 3001:

The user profile includes links for signo out and profile management, which are:

When your app initiates authentication the first call will be to /oauth/authorize.

When using INTERACTIVE mode, this will cause the 'sso' view to be rendered. On this page you can select whether or not to authorize the user.

In automatic / non-interactive mode, authorization will succeed.

'Unauthorised' causes a 401 response. When 'Authorised', your application's redirect URL will be called with a dummy authentication code. Your app should then call /oauth/token and optionally /api/user_details to retrieve the profile.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.