GithubHelp home page GithubHelp logo

jpetstore-usuarios's Introduction

JpetStore-usuarios

Endpoints

Comprobar si un usuario esta autenticado

HU14: Está autenticado

URL

POST /api/users/auth

Request body

{
  "jwt": "dfasdgvlashngf;vlkasdjflkjasl'df"
}

Response body

{
  "message": "true"
}

Registrar usuario

HU15: Crear cuenta, registro en el sistema

URL

POST /api/users

Request body

{
  "password": "123456",
  "email": "[email protected]",
  "phone": "123456789",
  "address": "Calle falsa 123",
  "fullName": "Test",
  "profilePicture": "base64",
  "role": "Administrador"
}

Response body

{
  "message": "usuario creado correctamente"
}

Obtener usuario por id

HU16: Obtener cuenta

URL

GET /api/users/${id}

Request body

sin request body

Response body

{
  "id": 1,
  "password": "123456",
  "email": "[email protected]",
  "phone": "123456789",
  "address": "Calle falsa 123",
  "fullName": "Test"
}

Cerrar sesión

HU17: Cerrar sesión

URL

POST /api/users/logout

Request body

{
  "jwt": "dfasdgvlashngf;vlkasdjflkjasl'df"
}

Response body

{
  "message": "sesion cerrada correctamente"
}

Actualizar usuario

HU18: Actualizar cuenta

URL

PUT /api/users/${id}

Request body

{
  "password": "123456",
  "correo": "[email protected]",
  "telefono": "123456789",
  "direccion": "Calle falsa 123",
  "nombres": "Test"
}

Response body

{
  "message": "usuario actualizado correctamente"
}

Autenticarse en el sistema

HU21: Autenticarse en el sistema

URL

POST /api/users/login

Request body

{
  "email": "[email protected]",
  "password": "123456"
}

Response body

{
  "jwt": "dfasdgvlashngf;vlkasdjflkjasl'df"
}

jpetstore-usuarios's People

Contributors

s8vega avatar

Watchers

 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.