Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/micedre/keycloak-mail-whitelisting
Keycloak extension to whitelist email adresses domain when users register
https://github.com/micedre/keycloak-mail-whitelisting
java keycloak maven
Last synced: about 4 hours ago
JSON representation
Keycloak extension to whitelist email adresses domain when users register
- Host: GitHub
- URL: https://github.com/micedre/keycloak-mail-whitelisting
- Owner: micedre
- License: apache-2.0
- Created: 2019-06-18T14:01:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-18T01:11:56.000Z (8 months ago)
- Last Synced: 2024-05-01T14:57:37.951Z (6 months ago)
- Topics: java, keycloak, maven
- Language: Java
- Homepage:
- Size: 44.9 KB
- Stars: 88
- Watchers: 6
- Forks: 27
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Keycloak - Email domain validation for registration
This extension allows you to validate email domain used for registration in keycloak to accept or deny a finite list of domain.
You can use basic [glob syntax](https://en.wikipedia.org/wiki/Glob_(programming))
(only `*` and `?` are supported)## How to install
The jar are deployed to Maven Central Repository here : https://repo1.maven.org/maven2/net/micedre/keycloak/keycloak-mail-whitelisting/
Simply drop the `jar` in the plugin directory, it will be automatically deployed by keycloak.
### Wildfly distribution (default until keycloak 16)
The plugin directory is `$KEYCLOAK_HOME\standalone\deployments`.
### Quarkus distribution (default since keycloak 17)
The plugin directory is `$KEYCLOAK_HOME\providers`.
## How to use
- Go to the admin console, in authentication menu.
- Copy the registration flow
- add a new execution below "Profile Validation" and choose "Profile Validation With Email Domain Check" or "Profile Validation with domain block"
- Set the execution "Required"
- Configure this new execution with the allowed or blocked domains, otherwise, keycloak will only accept or block "exemple.org" domains
- Change the registration binding to this new flow
- Configure the realm to accept registration and verify email (this is important!)## Display mail domains in register forms
This extension provides the list of authorized patterns in the `authorizedMailDomains` and `unauthorizedMailDomains` attribute of the registration page.
This can be used like this :
```
${msg("email")} (only ${authorizedMailDomains?join(", ")})
```