Giter Club home page Giter Club logo

auth-service's Introduction

Auth Flutterando with Golang JWT and hasura


Install docker and docker-compose

@todo Consult documentation ...

Configure your database

For perfect operation, use the following user table as a basis

CREATE TABLE users (
  id int pk not null unique,
  name text,
  mail text not null unique,
  password text
)

If you wanted to change, it would be interesting to read the source code to modify the points you think are best

Run

$ docker-compose up -d

Connect with your application

Routes

  • /v1/gettoken
    $ curl -X POST /auth/v1/gettoken -H 'Authorization: Basic BASE64(USER:PASS)'
  • /v1/check
    $ curl -X POST /auth/v1/check -H 'Authorization: Bearer TOKEN_JWT'
  • /v1/checkMail
    $ curl -X POST /auth/v1/checkMail -H 'Content-Type: application/json' -d '{"name":"João Teste","mail":"[email protected]", ,"code": 12345678}'
  • /v1/register
    $ curl -X POST /auth/v1/register -H 'Content-Type: application/json' -d '{"name":"João Teste","mail":"[email protected]", ,"password": "md5-password", "photo": "http://upload-image", "github_user": ""}'
  • /v1/upload
    $ curl -X POST /auth/v1/upload -H 'content-type: multipart/form-data;' -F file=FILE_PATH_ON_CLIENT
  • /v1/uploads/{img}
    $ curl -X GET /auth/v1/uploads/FILE_UPLOADED

auth-service's People

Contributors

jacobaraujo7 avatar faustobdls avatar cdavid14 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.