Hi.
I am working on a module (Keycloak 10.0.1, Postgresql) which will be using several SPI features. It has LoginFormsProviderFactory and AuthenticatorFactory extensions. Now I am trying to extend JpaEntityProviderFactory. My aim is to log some additional data, which I get from login flow, on a new table. So I need to add a new entity.
Before this step, my module was working fully fine with LoginFormsProviderFactory and AuthenticatorFactory extensions.
But when I added keycloak-model-jpa to my pom.xml , all "browser flow"s (my copy flow for my test realm and also original flow for master realm) seems to be broken somehow. The error in the log is starting like that:
DEBUG [org.keycloak.protocol.AuthorizationEndpointBase] (default task-1) Sent request to authz endpoint. Created new root authentication session with ID ‘7cee4346-5dce-424b-b00d-06d76ba4758a’ . Client: account . New authentication session tab ID: XEDN5MgAic8
2020-07-06 02:45:58,880 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-1) Uncaught server error: java.lang.NullPointerException
at org.keycloak.protocol.AuthorizationEndpointBase.createAuthenticationSession(AuthorizationEndpointBase.java:209)
at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.process(AuthorizationEndpoint.java:156)
at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.buildGet(AuthorizationEndpoint.java:112)
If I remove keycloak-model-jpa from pom.xml, it seems to be stable again.
Btw, I could create the table, so changelog.xml is working fine.
I have been coding all sorts of Keycloak modules for 2 years. But never tried to add a custom entity. So this error is new to me.
Thanks in advance.