Code Monkey home page Code Monkey logo

seed-desafio-mercado-livre's Introduction

Desafio 2 da segunda jornada do Dev Eficiente

O desafio consiste em implementar uma parte do mercado livre, seguindo as práticas do CDD (Cognitive Driven Development), proposto na jornada do https://deveficiente.com/

Stack

  • JDK 11
  • Spring boot 2.3.5
  • Lombok
  • H2
  • JUnit 5
  • Swagger
  • Security com Keycloak

Como subir o Keycloak?

Seguindo esse tutorial https://www.baeldung.com/spring-boot-keycloak, é necessário baixar o standalone, subir local e configurar:

  • Um realm com nome 'SpringBootKeycloak'
  • Um client com nome/resource 'mercado-livre-app'

Gerando token

Primeiro, é necessário criar um usuário no Keycloak. Depois, basta fazer a chamada:

curl --location --request POST 'http://localhost:8180/auth/realms/SpringBootKeycloak/protocol/openid-connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: JSESSIONID=9B43E751AC8743F07EE81E6CD9932C50.laptop-eb574g16; JSESSIONID=9B43E751AC8743F07EE81E6CD9932C50; OAuth_Token_Request_State=5f003f4f-9eff-441a-9564-864d78006a75' \
--data-urlencode 'client_id=mercado-livre-app' \
--data-urlencode 'username=seu-usuario' \
--data-urlencode 'password=sua-senha' \
--data-urlencode 'grant_type=password'

Como rodar?

seed-desafio-mercado-livre's People

Contributors

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