Creating Java Application for the Keycloak
Remove app module and keep just src and build.gradle
https://github.com/diegolirio/my-keycloak/?tab=readme-ov-file#spi-login-otp-send-mail
- Vá para Run → Edit Configurations.
- Clique no + e selecione Remote JVM Debug.
- Configure os seguintes parâmetros:
- Name: Keycloak Debug
- Transport: Socket
- Debugger mode: Attach
- Host: localhost
- Port: 5005
- Command line arguments for remote JVM: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
- Clique em Apply e OK.
curl --location 'http://localhost:8080/realms/med/protocol/openid-connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=opt-client' \
--data-urlencode 'username=35357659869' \
--data-urlencode 'password=Teste@123' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'client_secret=kTnp1VX7MwpQzFkA8ZwwwuipuL2bYbEw'
curl --location 'http://localhost:8080/realms/med/protocol/openid-connect/token/otp' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=opt-client' \
--data-urlencode 'username=35357659869' \
--data-urlencode 'password=Teste@123' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'client_secret=kTnp1VX7MwpQzFkA8ZwwwuipuL2bYbEw' \
--data-urlencode 'opt=786190'


