Search in sources :

Example 1 with RealmConfigCallback

use of com.hazelcast.security.RealmConfigCallback in project hazelcast by hazelcast.

the class ClientCallbackHandler method handleCallback.

protected void handleCallback(Callback cb) throws UnsupportedCallbackException {
    if (cb instanceof RealmConfigCallback) {
        RealmConfigCallback realmCb = (RealmConfigCallback) cb;
        RealmConfig realmCfg = null;
        if (clientConfig != null && clientConfig.getSecurityConfig() != null) {
            realmCfg = clientConfig.getSecurityConfig().getRealmConfig(realmCb.getRealmName());
        }
        realmCb.setRealmConfig(realmCfg);
    } else {
        throw new UnsupportedCallbackException(cb);
    }
}
Also used : RealmConfig(com.hazelcast.config.security.RealmConfig) RealmConfigCallback(com.hazelcast.security.RealmConfigCallback) UnsupportedCallbackException(javax.security.auth.callback.UnsupportedCallbackException)

Aggregations

RealmConfig (com.hazelcast.config.security.RealmConfig)1 RealmConfigCallback (com.hazelcast.security.RealmConfigCallback)1 UnsupportedCallbackException (javax.security.auth.callback.UnsupportedCallbackException)1