Skip to content

Releases: TNG/keycloak-mock

v0.9.0

30 Aug 16:01
Compare
Choose a tag to compare

New features

Bugfixes

  • fix incompatibility between vert.x and Spring Boot (#74)
  • properly shut down mock (#90)

v0.8.0

21 Jun 11:27
Compare
Choose a tag to compare

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

01 Mar 16:54
Compare
Choose a tag to compare

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

25 Sep 15:14
Compare
Choose a tag to compare

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 to com.tngtech.keycloakmock.junit.KeycloakMockRule
  • com.tngtech.keycloakmock.junit5.KeycloakMock has been renamed to com.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

13 Aug 15:21
Compare
Choose a tag to compare

Changes
Updated dependencies and made standalone application compatible to Keycloak 11.0.

v0.4.0

19 Jun 20:59
Compare
Choose a tag to compare

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)

v0.3.0

17 Apr 15:29
3d22807
Compare
Choose a tag to compare

Standalone:

  • support logout
  • support implicit flow (fixes #8)
  • return build version on --version flag
  • add simple command-line logging

Mock:

  • allow configuring token from existing serialized JWT
  • support some more keycloak-specific fields in token configuration

v0.2.0

10 Jan 16:47
17de7b4
Compare
Choose a tag to compare

support Keycloak 8 with new dynamic OpenID configuration lookup

v0.1.0

08 Nov 16:46
Compare
Choose a tag to compare

Initial release