Skip to content

Alotech-Bootcamp-Grad-Project-Group-1/Alotech-FullStack-Bootcamp-Graduation-Project-Group-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single Sign-On (SSO)

Single sign-on (SSO) is an authentication scheme that allows a user to log in with a single ID and password to any of several related, yet independent, software systems.


SSO Progress:

If a user visits an consumer or user module-protected service (foo.sso.example.com) and does not have a session cookie, they are redirected to sso-auth (sso-auth.example.com).

  • If the user does not have a session cookie for sso-auth, they are prompted to log in via the sso-auth, and then redirected back to consumer or user module (according to their user role) where they will now be logged in (to foo.sso.example.com)
  • If the user does have a session cookie for sso-auth (e.g. they have already logged into bar.sso.example.com), they are transparently redirected back to consumer where they will be logged in, without needing to go through the sso-auth

 Project Schema


Tech

  • MySQL
  • Node.js Restful API
  • Log4js
  • React
  • Mocha.js & Chai.js

Screenshots

SSO Auth Login Page

 SSO Auth Login Page

Consumer Page

 Consumer Page

User Module Admin Panel

 User Module Admin Panel

In Action

 Display Text

Installation & Configuration

- Clone Project

git clone repo clone Alotech-Bootcamp-Grad-Project-Group-1/Alotech-FullStack-Bootcamp-Graduation-Project-Group-1

- Install dependencies in:

  • SsoAuth client
  • SsoAuth server
  • SsoConsumer client
  • UserModule client
  • UserModule server

- Set Environment Variables

SALT_PASS & JWT_SECRET in:

  • SsoAuth server
  • UserModule server

- Import database.ddl to mysql

- Start Servers using concurrently

  • 1st terminal:
  cd SsoAuth
  npm start
  • 2nd terminal
  cd SsoConsumer
  cd client
  npm start
  • 3rd terminal:
  cd UserModule
  npm start

- Visit http://127.0.0.1:3010/?redirectURL=${redirectURL}

redirectURL should be one of authorized redirects,

  • http://127.0.0.1:9010, the user module
  • http://127.0.0.1:5000, the consumer

After running the tests, username: admin and password admin can be used to log in


API Reference


Running Tests

To run tests, run the following command

User Module Tests

  • 1st Terminal:
  cd UserModule
  cd server
  npm start
  • 2nd Terminal:
  cd UserModule
  cd server
  npm test

Sso Auth Tests

  • 1st Terminal:
  cd SsoAuth
  cd server
  npm start
  • 2nd Terminal:
  cd SsoAuth
  cd server
  npm test

Authors

About

Alotech FullStack Bootcamp Graduation Project of Group 1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •