Releases: TNG/keycloak-mock
v0.9.0
New features
- support desktop login flow using out-of-band login (see https://www.keycloak.org/docs/latest/securing_apps/#redirect-uris)
- support confidential client for resource owner password grant flow (#87)
- support client credentials flow (#87)
Bugfixes
v0.8.0
New features
- support for refresh token flow (#66)
- hostname and realm can be configured per generated token (#61)
- the OpenIDConnect implementation previously only present in the standalone module is now also available in the mock module
- support for resource owner passwort grant flow to request a valid token via simple REST call (#60)
Bugfixes
- updated Vert.x version to fix NPE when using mock in combination with Spring Boot 2.4.5+ (#74)
v0.7.0
New features
- mock configuration now supports the ACR claim
- standalone server now sets the ACR claim by default (#53)
- standalone server can now be configured to initialize resource roles instead of realm roles (#53)
- standalone server is now compatible with cypress-keycloak (#53)
- standalone server now supports "already logged in" flow when client has a valid session cookie
Bugfixes
- mock (and JUnit helpers) now fail hard if the target port is already in use (#44)
v0.6.0
Breaking changes
JUnit helpers
The JUnit helper classes have been renamed to avoid conflicts due to identical names.
com.tngtech.keycloakmock.junit.KeycloakMock
has been renamed tocom.tngtech.keycloakmock.junit.KeycloakMockRule
com.tngtech.keycloakmock.junit5.KeycloakMock
has been renamed tocom.tngtech.keycloakmock.junit5.KeycloakMockExtension
In addition, the mock-junit
module is now only usable in JUnit4 again. For JUnit5, please use the mock-junit5
module again, which is no longer deprecated.
Mock server configuration
The mock and both JUnit helpers are now constructed using a new ServerConfig class which can be created using a fluent builder.
Before:
KeycloakMock mock = new KeycloakMock(8000, "master", true);
After:
KeycloakMock mock = new KeycloakMock(aServerConfig().withPort(8000).withRealm("master").withTls(true).build());
New features
Hostname support
To allow running the standalone server within a container, the base URL of the server is now no longer hard-coded to localhost, but is taken from the Host
header of the corresponding REST request. The default hostname when no Host
header is set (e.g. when calling getAccessToken(TokenConfig)
) can be configured using the new ServerConfig class.
keycloak.js is served (#17)
The mock now supports serving the original keycloak.js script.
Standalone server fills more claims
The username entered in the mock login screen is now also used to fill preferred_username
, name
and family_name
. This will make usage possible if the frontend code expects those claims to be present.
v0.5.0
v0.4.0
Changes
In an attempt to clean up the code and simplify usage, the mock-junit5 module has been deprecated and its features introduced in the mock-junit module. Please migrate to the mock-junit module, as the mock-junit5 module will be removed in an upcoming release.
Bugfixes
- #32 (claim 'auth_time' had been filled with milliseconds rather than seconds since epoch)