Git Product home page Git Product logo

auth's Introduction

Security Rating Quality Gate Status Duplicated Lines (%) Vulnerabilities Code Smells

MakeFile

  • Start the application
    • make up
  • Stop the application
    • make stop
  • Build docker images form source code
    • make docker-build

RestAPI call endpoints

1. Create User 
  Endpoint url:- http://localhost:8081/api/v1/create_user
  Request Type-POST method
  Example:
  Request:- http://localhost:8081/api/v1/create_user
  {
      "first_name": "mukesh",
      "last_name": "pilaniya",
      "email": "[email protected]",
      "password": "pilaniya"
  }
  Response:-
  {
      "id": "bf325346-ab3f-11ec-8284-86023e8131c0",
      "first_name": "mukesh",
      "last_name": "pilaniya",
      "email": "[email protected]",
      "password": "pilaniya",
      "is_verified": false,
      "created_at": "0001-01-01T00:00:00Z",
      "updated_at": "0001-01-01T00:00:00Z"
  }
2. Generate Token
   Endpoint url:- http://localhost:8081/api/v1/generate_token
   Request Type-POST method
   Example:
   Request:- http://localhost:8081/api/v1/generate_token
   {   
      "email": "[email protected]",
      "password": "pilaniya"
   }
   Response:-
   {
      "message": "token generated",
      "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImI5NDBiMjhjLTczYTgtNDJjNS05ZjczLWYxODg4YmJlNjlkYSIsInVzZXJfaWQiOiJiZjMyNTM0Ni1hYjNmLTExZWMtODI4NC04NjAyM2U4MTMxYzAiLCJpc3MiOiJwaWxhbml5YS5hdXRoLnNlcnZpY2UiLCJpc3N1ZWRfYXQiOjE2NDgxMDU0NzgsImV4cGlyZWRfYXQiOjE2NDgxMDU1OTgsImNsYWltcyI6e319.4k1PNH3Mxthw5NEF4RDepMLlYMnkOpYfOIHw49b9ocE",
      "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjA2Nzk5MzUwLTAzZTQtNDhhOS05NmNlLTJiOWYyYTU4NzViOCIsInVzZXJfaWQiOiJiZjMyNTM0Ni1hYjNmLTExZWMtODI4NC04NjAyM2U4MTMxYzAiLCJpc3MiOiJwaWxhbml5YS5hdXRoLnNlcnZpY2UiLCJpc3N1ZWRfYXQiOjE2NDgxMDU0NzgsImV4cGlyZWRfYXQiOjE2NDgxMDYwNzgsImNsYWltcyI6e319.1LowDhPuKm46nQXPZ7Wp2RihOfiFEUE9edr43vm5ogU"
   }
3. Get User by Id
   Endpoint url:- http://localhost:8081/api/v1/get_user
   Request Type-POST method
   Example:
   Request:- http://localhost:8081/api/v1/get_user
   Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImI5NDBiMjhjLTczYTgtNDJjNS05ZjczLWYxODg4YmJlNjlkYSIsInVzZXJfaWQiOiJiZjMyNTM0Ni1hYjNmLTExZWMtODI4NC04NjAyM2U4MTMxYzAiLCJpc3MiOiJwaWxhbml5YS5hdXRoLnNlcnZpY2UiLCJpc3N1ZWRfYXQiOjE2NDgxMDU0NzgsImV4cGlyZWRfYXQiOjE2NDgxMDU1OTgsImNsYWltcyI6e319.4k1PNH3Mxthw5NEF4RDepMLlYMnkOpYfOIHw49b9ocE
   {   
      "id": "bf325346-ab3f-11ec-8284-86023e8131c0"
   }
   Response:-
   {
      "id": "bf325346-ab3f-11ec-8284-86023e8131c0",
      "first_name": "mukesh",
      "last_name": "pilaniya",
      "email": "[email protected]",
      "password": "pilaniya",
      "is_verified": false,
      "created_at": "2022-03-24T12:28:02.068075Z",
      "updated_at": "2022-03-24T12:28:02.068075Z"
   }
4. Generate Access Token Form Refresh Token
   Endpoint url:- http://localhost:8081/api/v1/generate_access_token
   Request Type-POST method
   Example:
   Request:- http://localhost:8081/api/v1/generate_access_token
   {
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjA2Nzk5MzUwLTAzZTQtNDhhOS05NmNlLTJiOWYyYTU4NzViOCIsInVzZXJfaWQiOiJiZjMyNTM0Ni1hYjNmLTExZWMtODI4NC04NjAyM2U4MTMxYzAiLCJpc3MiOiJwaWxhbml5YS5hdXRoLnNlcnZpY2UiLCJpc3N1ZWRfYXQiOjE2NDgxMDU0NzgsImV4cGlyZWRfYXQiOjE2NDgxMDYwNzgsImNsYWltcyI6e319.1LowDhPuKm46nQXPZ7Wp2RihOfiFEUE9edr43vm5ogU"
   }
   Response:-
   {
	"message": "Access token generated",
	"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImY2MTYwZmI2LTY3ODgtNDI5Zi04ZjEwLWE4NTMyOTIxYjA4YiIsInVzZXJfaWQiOiJiZjMyNTM0Ni1hYjNmLTExZWMtODI4NC04NjAyM2U4MTMxYzAiLCJpc3MiOiJwaWxhbml5YS5hdXRoLnNlcnZpY2UiLCJpc3N1ZWRfYXQiOjE2NDgxMDU3OTEsImV4cGlyZWRfYXQiOjE2NDgxMDU5MTEsImNsYWltcyI6e319.E9GotSTOh6Gqn1Oupv_X4_a9IoTtF5pvyAjXKkC3_Ok"
    }

auth's People

Contributors

mukeshpilaniya avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.