TNG / keycloak-mock

A Java library to test REST endpoints secured by Keycloak via OpenID connect.
Apache License 2.0
122 stars 27 forks source link

Standalone: Support resource owner password credentials flow #60

Closed ostrya closed 3 years ago

ostrya commented 3 years ago

See https://www.keycloak.org/docs/latest/securing_apps/#_resource_owner_password_credentials_flow.

The server should return a valid token for a request like this:

curl \
  -d "client_id=myclient" \
  -d "username=user" \
  -d "password=role1,role2,role3" \
  -d "grant_type=password" \
  "http://localhost:8080/auth/realms/myrealm/protocol/openid-connect/token"