GitXplorerGitXplorer
h

auth-service

public
50 stars
6 forks
1 issues

Commits

List of commits on branch master.
Unverified
790517a5c7076857de6da1c9d8563b967172f531

update for latest docker changes

hhharnisc committed 8 years ago
Unverified
39a5395b399f49e28ab4f8424b8d7ad2316fe9e9

clean up docker-compose files

hhharnisc committed 8 years ago
Unverified
c928635f900db5b39d20d7b7a6083be55b252db9

more flexible docker container

hhharnisc committed 8 years ago
Unverified
428bc30a986a0928354d4f4f45db19435b1c66d1

update docker compose files

hhharnisc committed 8 years ago
Unverified
5eb7a9b0066de96242180376d975f5fe0a526240

cleanup after running containers

hhharnisc committed 8 years ago
Unverified
70530e5212cf04d1349ec6d1e7aec2e3aecb1b0c

+docker compose -kubernetes

hhharnisc committed 8 years ago

README

The README file for this repository.

Auth

Build Status

A token management service. It is responsible for creating, refreshing and destroying authentication tokens. Expirable/refreshable tokens are generated using JTW and can be passed onto the client.

Table Of Contents

Quickstart

Install docker beta

Do a local deploy

./local_deploy.sh

Testing

Install docker toolbox (for CI tests)

$ cd service

Install dependencies

$ npm install

CI Tests

$ npm run test

Run Unit Tests

$ npm run test:jest

Run Unit Tests (and watch for changes)

$ npm run test:watch

Run Integration Tests

$ npm run test:integration

Running Locally

$ cd service

Install dependencies

$ npm install

Start the server

$ npm start

Deploy Locally

Follow Quickstart instructions

Deploy Locally With Hot Reload

./local_deploy.sh -d

Deploy Locally And Skip Build Step

./local_deploy.sh -n

Deploy Locally With Hot Reload And Skip Build Step

./local_deploy.sh -dn

Deploy To Production

TODO

API

GET /health

A health check

request

No parameters

response

{}

POST /v1/create

Create a new auth token for a user

request

  • userId - string - an existing user id

response

  • accessToken - string - expirable token used to authenticate requests
  • refreshToken - string - persistent token used to generate an accessToken
  • expireTime - unix timestamp - the time the access token expires

POST /v1/refresh

Refresh an accessToken with the refreshToken

request

  • userId - string - an existing user id
  • refreshToken - string - persistent token used to generate an accessToken

response

  • accessToken - string - expirable token used to authenticate requests
  • expireTime - unix timestamp - the time the access token expires

POST /v1/reject

Delete a refreshToken so it cannot refresh an accessToken

request

  • userId - string - an existing user id
  • refreshToken - string - persistent token used to generate an accessToken

response

Empty