Giter Club home page Giter Club logo

testpracticojavawork's Introduction

TestJavaSentra

Registro de usuario

Enviar el siguiente json para los registros:

Endpoint: {path}/test/registro

Body json:

 {
        "name": "Isaac Mund",
        "email": "[email protected]",
        "password": "Clave12345",
        "phones": [
            {
                "number": "97777875",
                "citycode": "3",			
                "contrycode": "+56"
            }
        ]
}

login de usuario

Enviar username y password por ejemplo:

Endpoint: {path}/test/login

Body json:

{
    "username": "[email protected]",
    "password" : "Clave12345"
}

Perfil de usuario

Enviar id generado en por el registro Ejemplo:

EndPoint: {path}/test/perfil/65a4f42d-6526-4a6f-8574-25a01fd79c8d

Se tiene que agregar el Header: X-auth-token : {token que se ha generado}

Ejemplo: X-auth-token: eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJqdWFuQHJvZHJpZ3Vlei5vcmciLCJzdWIiOiJodW50ZXIyIiwiZXhwIjoxNzAwNzkyMzMwfQ.C8Axodoi6X7pbVoGDJaOCssQKBW7TFvxpvKkXjPx590

{
    "id": "045c5f42-2f1d-44e7-b902-406571217a79",
    "created": "2023-11-24 01:48",
    "modified": "2023-11-24 01:48",
    "last-login": "2023-11-24 01:48",
    "isactive": "activo",
    "token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJqdWFuQHJvZHJpZ3Vlei5vcmciLCJzdWIiOiJodW50ZXIyIiwiZXhwIjoxNzAwNzkyMzMwfQ.C8Axodoi6X7pbVoGDJaOCssQKBW7TFvxpvKkXjPx590"
}

Para la documentación con Swagger el Endpoint es el siguiente: http://localhost:8080/swagger-ui.html#/

POSTMAN COLLECTION:

{
  "info": {
    "_postman_id": "374bcef2-2bad-47c0-98d0-d8c871165831",
    "name": "SentraCollection",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "localhost:8080/test/registro",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n        \"name\": \"Isaac mundo\",\r\n        \"email\": \"[email protected]\",\r\n        \"password\": \"Clave12345\",\r\n        \"phones\": [\r\n            {\r\n                \"number\": \"977778275\",\r\n                \"citycode\": \"3\",\t\t\t\r\n                \"contrycode\": \"+56\"\r\n            }\r\n        ]\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "localhost:8080/test/registro",
          "host": [
            "localhost"
          ],
          "port": "8080",
          "path": [
            "test",
            "registro"
          ]
        },
        "description": "Registro de usuario "
      },
      "response": []
    },
    {
      "name": "localhost:8080/test/login",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"username\": \"[email protected]\",\r\n    \"password\" : \"Clave12345\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "localhost:8080/test/login",
          "host": [
            "localhost"
          ],
          "port": "8080",
          "path": [
            "test",
            "login"
          ]
        },
        "description": "Login de usuario "
      },
      "response": []
    },
    {
      "name": "localhost:8080/test/perfil/65a4f42d-6526-4a6f-8574-25a01fd79c8d",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "X-auth-token",
            "value": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJpbXVuZG85MEBnbWFpbC5jb20iLCJzdWIiOiJDbGF2ZTEyMzQ1IiwiZXhwIjoxNzE0MjUzMzk5fQ.VEUGLfZuwvM51jfAy2CSJ8ytjYExy6RheEXOB98-Pgw",
            "type": "text"
          }
        ],
        "url": {
          "raw": "localhost:8080/test/perfil/65a4f42d-6526-4a6f-8574-25a01fd79c8d",
          "host": [
            "localhost"
          ],
          "port": "8080",
          "path": [
            "test",
            "perfil",
            "65a4f42d-6526-4a6f-8574-25a01fd79c8d"
          ]
        },
        "description": "consulta de perfil de usuario"
      },
      "response": []
    }
  ]
}

testpracticojavawork's People

Contributors

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