Search in sources :

Example 1 with JAASUsernameTokenValidator

use of org.apache.wss4j.dom.validate.JAASUsernameTokenValidator 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 2 with JAASUsernameTokenValidator

use of org.apache.wss4j.dom.validate.JAASUsernameTokenValidator 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)2 JAASUsernameTokenValidator (org.apache.wss4j.dom.validate.JAASUsernameTokenValidator)2 Bundle (org.osgi.framework.Bundle)2