Search in sources :

Example 1 with BackingEngine

use of org.apache.karaf.jaas.modules.BackingEngine in project karaf by apache.

the class ListGroupsCommand method execute.

@Override
public Object execute() throws Exception {
    JaasRealm realm = (JaasRealm) session.get(JAAS_REALM);
    AppConfigurationEntry entry = (AppConfigurationEntry) session.get(JAAS_ENTRY);
    if (realm == null || entry == null) {
        System.err.println("No JAAS Realm / Module has been selected.");
        return null;
    }
    BackingEngine engine = getBackingEngine(entry);
    if (engine == null) {
        System.err.println("Can't get the list of users (no backing engine service registered)");
        return null;
    }
    return doExecute(engine);
}
Also used : JaasRealm(org.apache.karaf.jaas.config.JaasRealm) BackingEngine(org.apache.karaf.jaas.modules.BackingEngine) AppConfigurationEntry(javax.security.auth.login.AppConfigurationEntry)

Example 2 with BackingEngine

use of org.apache.karaf.jaas.modules.BackingEngine in project karaf by apache.

the class UpdateCommand method execute.

@Override
public Object execute() throws Exception {
    JaasRealm realm = (JaasRealm) session.get(JAAS_REALM);
    AppConfigurationEntry entry = (AppConfigurationEntry) session.get(JAAS_ENTRY);
    if (realm == null || entry == null) {
        System.err.println("No JAAS Realm/Login Module selected");
        return null;
    }
    BackingEngine engine = getBackingEngine(entry);
    if (engine == null) {
        System.err.println("Can't update the JAAS realm (no backing engine service registered)");
        return null;
    }
    return doExecute(engine);
}
Also used : JaasRealm(org.apache.karaf.jaas.config.JaasRealm) BackingEngine(org.apache.karaf.jaas.modules.BackingEngine) AppConfigurationEntry(javax.security.auth.login.AppConfigurationEntry)

Example 3 with BackingEngine

use of org.apache.karaf.jaas.modules.BackingEngine in project karaf by apache.

the class ListUsersCommand method execute.

@Override
public Object execute() throws Exception {
    JaasRealm realm = (JaasRealm) session.get(JAAS_REALM);
    AppConfigurationEntry entry = (AppConfigurationEntry) session.get(JAAS_ENTRY);
    if (realm == null || entry == null) {
        System.err.println("No JAAS Realm/Login Module has been selected");
        return null;
    }
    BackingEngine engine = getBackingEngine(entry);
    if (engine == null) {
        System.err.println("Can't get the list of users (no backing engine service found)");
        return null;
    }
    return doExecute(engine);
}
Also used : JaasRealm(org.apache.karaf.jaas.config.JaasRealm) BackingEngine(org.apache.karaf.jaas.modules.BackingEngine) AppConfigurationEntry(javax.security.auth.login.AppConfigurationEntry)

Aggregations

AppConfigurationEntry (javax.security.auth.login.AppConfigurationEntry)3 JaasRealm (org.apache.karaf.jaas.config.JaasRealm)3 BackingEngine (org.apache.karaf.jaas.modules.BackingEngine)3