Git Product home page Git Product logo

authenticationserver's Introduction

Authentication server with Project Id

Build with:

docker build --tag authi .
docker run -d -it -p 8000:8000 authi

From Docker Hub: docker run -d -it -p 8000:8000 augustosalazar/authi:2

@baseUrl = http://127.0.0.1:8000 @contentType = application/json

GET {{baseUrl}}/users/ HTTP/1.1

-----------------

POST {{baseUrl}}/register/ HTTP/1.1 Content-Type: {{contentType}}

{ "username": "pepe22", "first_name": "pepon", "last_name": "pentoski", "password": "1234" }

-----------------

POST {{baseUrl}}/login/ HTTP/1.1 Content-Type: {{contentType}}

{ "username": "pepe22", "password": "1234" }

-----------------

GET {{baseUrl}}/me/ HTTP/1.1 Content-Type: {{contentType}} Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJqdWFuOTk5IiwiZXhwIjoxNjgzOTk5NjExfQ.Z1jgEvksFd7ZGB4uUxQzdIxRDGfmNf9jFPfeM-TBub0

-----------------

POST {{baseUrl}}/refresh/ HTTP/1.1 Content-Type: {{contentType}}

{ "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJqdWFuOTk5IiwiZXhwIjoxNjg0MDM4NDYwfQ.GiEn9Gc4kL3_KkRAbwfIn2tpqn0dDNGGjRu3iGj3VU0" }

-----------------

GET {{baseUrl}}/users/ HTTP/1.1

Next steps:

  1. Service mode: the idea is to provide authentication services to multiple applications, each with its own contract, to achieve this, we need: a. An endpoint that receives a request to create a new contract and gives back a key, this key should be unique and serves to identify the contract
    b. The key should be used in any subsequential request
    c. Each contract will be allowed up to 100 users.
  2. Persistence
    a. Use a database to store keys and user information for every contract
    b. Create an admin page to be able to delete contracts

Author: Shaddia Andrea Acuña Lara

authenticationserver's People

Contributors

augustosalazar avatar

Watchers

James Cloos avatar  avatar

Forkers

leolizc

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.