keycloak/examples/providers/authenticator
Jon Koops 972ebb9650
Use a valid SemVer format for the SNAPSHOT version (#17334)
* Use a valid SemVer format for the SNAPSHOT version

* Update pom.xml

* Update pom.xml

---------

Co-authored-by: Stian Thorgersen <stianst@gmail.com>
Co-authored-by: Stian Thorgersen <stian@redhat.com>
2023-03-03 11:11:44 +01:00
..
src/main Remove duplicated set-cookie header from response when expiring cookies 2023-02-27 14:17:27 -03:00
README.md Fix minor typos in examples (#13155) 2022-08-05 09:00:11 -03:00
pom.xml Use a valid SemVer format for the SNAPSHOT version (#17334) 2023-03-03 11:11:44 +01:00
secret-question-config.ftl
secret-question.ftl

README.md

Example Custom Authenticator

  1. First, Keycloak must be running. See Getting Started, or you can build distribution from source.

  2. Execute the follow. This will build the example and deploy it

    $ mvn clean install wildfly:deploy

  3. Copy the secret-question.ftl and secret-question-config.ftl files to the themes/base/login server directory.

  4. Login to admin console. Hit browser refresh if you are already logged in so that the new providers show up.

  5. Go to the Authentication menu item and go to the Flows tab, you will be able to view the currently defined flows. You cannot modify a built-in flows, so, to add the Authenticator you have to copy an existing flow or create your own. Copy the "Browser" flow.

  6. In your copy, click the Actions menu item in Forms subflow and Add Execution. Pick Secret Question and change the Requirement choice.

  7. Go to the Bindings tab in Authentication menu and change the default Browser Flow to your copy of the browser flow and click Save.

  8. Next you have to register the required action that you created. Click on the Required Actions tab in the Authentication menu. Click on the Register button and choose your new Required Action. You can also choose the Default Action for the Required Action and each new user has to set the secret answer. Your new required action should now be displayed and enabled in the required actions list.