user666
user666

Reputation: 2013

Extend Keycloak authentication SPI

I would like to implement myself the authentication part of keycloak. This is to be able to add a custom authentication that communicates with another identity server. I saw in keycloak documentation that we have authentication SPI that we can extend but i did not find any tutorials about this. Doc link: keycloak spi link I was about to check the keycloak sample provider code for authentication on git hub Ref. link however the used version for keycloak was not found when i iported locally the project. Also I cant find the classes under package org.keycloak.authentication in any of keycloak jars (latest ones)

keycloak server spi with no authentication package

Upvotes: 3

Views: 8094

Answers (1)

cdan
cdan

Reputation: 3576

The section Authenticator SPI Walk Through of last release's Server Development guide is as good as a tutorial, as far as I can see.

If you want to use the samples against a Keycloak release, you have to select the tag on github that matches your Keycloak release, e.g. tag 4.2.1.Final if you are using Keycloak 4.2.1.Final.

The org.keycloak.authentication.AuthenticatorFactory class is in keycloak-server-spi-private dependency that is used in the pom.xml of the samples. This maven artifact is on Maven Central like the others used in the POM, so the JARs should be retrieved from there by Maven.

Upvotes: 2

Related Questions