I'd like to add a custom LoginModule to Karaf Jaas framework, and create a new realm that will use it.
How can I do this?
I'd like to add a custom LoginModule to Karaf Jaas framework, and create a new realm that will use it.
How can I do this?
Copyright © 2021 Jogjafile Inc.
I have my own solution as follows, implemented using Declarative Services.
First of all, create a new
LoginModule
implementation extendingorg.apache.karaf.jaas.modules.AbstractKarafLoginModule
.Second; in order to use this class as the LoginModule of a new realm, we have to register a new
org.apache.karaf.jaas.config.JaasRealm
service and set our own login module. We will put this file in the same bundle with theCustomLoginModule
.