Giter VIP home page Giter VIP logo

demo-sso's Introduction

IMPORTANT

This repository is DEPRECATED and will not be updated.
For an examples using the jolocom-lib, see this demo or the generic backend.

Install

To begin, we need to clone this repository and install all dependencies:

  # clone the repository and navigate to the new folder
  git clone https://github.com/jolocom/demo-sso.git; cd ./demo-sso

  # install all dependencies
  yarn install
  # or
  npm install

In order to ensure that the application works correctly, you will also need redis installed on your local machine. The demo application makes use of the redis-server and redis-cli commands to launch, and close a local database upon start and exit.

To ensure no errors occured during the instalation steps, we can attempt to start the service:

  # Ensure you are in the 'demo-sso' folder
  yarn start

If all goes fine, after a few seconds you should see the following printed message:

"Demo service started, listening on port 9000"

This means we are ready to go on!

Editing the service configuration file

If we open the config.ts - file located in the project root directory, we will notice that there are 3 options we can configure:

  1. seed - A 32 byte Buffer of random bytes, used for deriving key pairs, as explained in the the getting started section.

  2. password - Password used to encrypt the seed on the instance. Must be provided for any opperations involving key derivation.

  3. serviceUrl - The url that can be used reach the deployed service, if you are testing locally, the default value should suffice.

  4. credentialRequirements - the types of credentials required by the service. By default the service requires a ProofOfNameCredential, with no associated constraints.

After the fields have been configured, the service can be started by running yarn start

Authenticating against the local service

Now that we have the local service running, we can open our browsers and navigate to http://localhost:9000/ to be presented with the landing page. If you tap the button to continue with Jolocom, the service will generate a credential request (as defined here), encode it as a QR code, and display the resulting image.

At this point the presented request can be scanned using the Jolocom SmartWallet in order to generate the corresponding credential response and share it with the service.

This repository also includes a script that can be run to simulate the client completing the authentication for testing and development purposes. Further documentation on which can be found here

demo-sso's People

Contributors

exulansis avatar nataschaberg avatar mnzaki avatar charleenfei avatar katszwn avatar chunningham avatar rantwijk avatar kakao-jun-e avatar saifahn avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.