Search in sources :

Example 11 with JaasRealm

use of org.apache.karaf.jaas.config.JaasRealm in project ddf by codice.

the class UsernameTokenValidator method removeRealm.

public void removeRealm(ServiceReference<JaasRealm> serviceReference) {
    Bundle bundle = FrameworkUtil.getBundle(UsernameTokenValidator.class);
    if (null != bundle) {
        JaasRealm realm = bundle.getBundleContext().getService(serviceReference);
        LOGGER.trace("Removing validator for JaasRealm {}", realm.getName());
        validators.remove(realm.getName());
    }
}
Also used : JaasRealm(org.apache.karaf.jaas.config.JaasRealm) Bundle(org.osgi.framework.Bundle)

Example 12 with JaasRealm

use of org.apache.karaf.jaas.config.JaasRealm in project ddf by codice.

the class UsernameTokenValidator method addRealm.

public void addRealm(ServiceReference<JaasRealm> serviceReference) {
    Bundle bundle = FrameworkUtil.getBundle(UsernameTokenValidator.class);
    if (null != bundle) {
        JaasRealm realm = bundle.getBundleContext().getService(serviceReference);
        LOGGER.trace("Adding validator for JaasRealm {}", realm.getName());
        JAASUsernameTokenValidator validator = new JAASUsernameTokenValidator();
        validator.setContextName(realm.getName());
        validators.put(realm.getName(), validator);
    }
}
Also used : JaasRealm(org.apache.karaf.jaas.config.JaasRealm) JAASUsernameTokenValidator(org.apache.wss4j.dom.validate.JAASUsernameTokenValidator) Bundle(org.osgi.framework.Bundle)

Example 13 with JaasRealm

use of org.apache.karaf.jaas.config.JaasRealm in project ddf by codice.

the class UPBSTValidator method addRealm.

public void addRealm(ServiceReference<JaasRealm> serviceReference) {
    Bundle bundle = FrameworkUtil.getBundle(UPBSTValidator.class);
    if (null != bundle) {
        JaasRealm realm = bundle.getBundleContext().getService(serviceReference);
        LOGGER.trace("Adding validator for JaasRealm {}", realm.getName());
        JAASUsernameTokenValidator validator = new JAASUsernameTokenValidator();
        validator.setContextName(realm.getName());
        validators.put(realm.getName(), validator);
    }
}
Also used : JaasRealm(org.apache.karaf.jaas.config.JaasRealm) JAASUsernameTokenValidator(org.apache.wss4j.dom.validate.JAASUsernameTokenValidator) Bundle(org.osgi.framework.Bundle)

Aggregations

JaasRealm (org.apache.karaf.jaas.config.JaasRealm)13 AppConfigurationEntry (javax.security.auth.login.AppConfigurationEntry)7 Bundle (org.osgi.framework.Bundle)4 Queue (java.util.Queue)3 BackingEngine (org.apache.karaf.jaas.modules.BackingEngine)3 JAASUsernameTokenValidator (org.apache.wss4j.dom.validate.JAASUsernameTokenValidator)2 LinkedList (java.util.LinkedList)1 List (java.util.List)1 KeystoreInstance (org.apache.karaf.jaas.config.KeystoreInstance)1 KeystoreManager (org.apache.karaf.jaas.config.KeystoreManager)1 Module (org.apache.karaf.jaas.config.impl.Module)1 ShellTable (org.apache.karaf.shell.support.table.ShellTable)1 Test (org.junit.Test)1 ServiceReference (org.osgi.framework.ServiceReference)1 ServiceTrackerCustomizer (org.osgi.util.tracker.ServiceTrackerCustomizer)1