Git Product home page Git Product logo

keycloak-custom-required-action's Introduction

Custom terms and conditions

This is a keycloak plugin which implements the keycloak required action SPI. This plugin enables you to have a second terms and conditions (ToS) required action. Sometimes, one has different kind of users in the same realm and need to provide different ToS.

Usage

  • In order to use this plugin, a ftl file called custom_terms.ftl must be present in your theme. There is no default keycloak theme so this required action won't work if the theme is not ready.
  • The plugin is tested with keycloak version 11.0.2

build

    mvn clean package

Run locally

The repository contains a docker-compose.yml file with a keycloak container and a minimal custom_terms.ftl so you can verify the SPI works as expected:

  1. Build using mvn clean package
  2. Run cp ./target/custom-terms-and-conditions-0.0.1-SNAPSHOT.jar ./deployments
  3. Run docker-compose up
  4. Open http://localhost:9090 and login using admin/admin
  5. Navigate to Realm Settings and open tab Login
  6. Activate option User Registration
  7. Navigate to Authentication and open tab Required Actions
  8. Click Register and choose Custom Terms and Conditions
  9. Enable option Default Action on the registered action
  10. Open new private browser tab and navigate to http://localhost:9090

deployment

To use this required action, copy the jar file into the /standalone/deployments directory. According to the official documentation, hot deployment is possible.

keycloak-custom-required-action's People

Contributors

eddykaya avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.