Search in sources :

Example 1 with ClientApprovalKeys

use of edu.uiuc.ncsa.security.delegation.storage.ClientApprovalKeys in project OA4MP by ncsa.

the class OA2ConfigurationLoader method getCASP.

@Override
protected MultiDSClientApprovalStoreProvider getCASP() {
    if (casp == null) {
        casp = new MultiDSClientApprovalStoreProvider(cn, isDefaultStoreDisabled(), loggerProvider.get());
        final ClientApprovalProvider caProvider = new ClientApprovalProvider();
        ClientApprovalKeys caKeys = new ClientApprovalKeys();
        caKeys.identifier("client_id");
        ClientApproverConverter cp = new ClientApproverConverter(caKeys, caProvider);
        casp.addListener(new DSFSClientApprovalStoreProvider(cn, cp));
        casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, cp));
        casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, cp));
        casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, cp));
        casp.addListener(new TypedProvider<ClientApprovalStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.CLIENT_APPROVAL_STORE) {

            @Override
            public Object componentFound(CfgEvent configurationEvent) {
                if (checkEvent(configurationEvent)) {
                    return get();
                }
                return null;
            }

            @Override
            public ClientApprovalStore get() {
                return new ClientApprovalMemoryStore(caProvider);
            }
        });
    }
    return casp;
}
Also used : MultiDSClientApprovalStoreProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.storage.MultiDSClientApprovalStoreProvider) DSFSClientApprovalStoreProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.storage.filestore.DSFSClientApprovalStoreProvider) CfgEvent(edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent) ClientApprovalMemoryStore(edu.uiuc.ncsa.security.delegation.server.storage.impl.ClientApprovalMemoryStore) ClientApprovalKeys(edu.uiuc.ncsa.security.delegation.storage.ClientApprovalKeys) ClientApproverConverter(edu.uiuc.ncsa.myproxy.oa4mp.server.util.ClientApproverConverter) ClientApprovalStore(edu.uiuc.ncsa.security.delegation.server.storage.ClientApprovalStore) ClientApprovalProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.ClientApprovalProvider) DSSQLClientApprovalStoreProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.storage.sql.provider.DSSQLClientApprovalStoreProvider)

Aggregations

ClientApprovalProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.ClientApprovalProvider)1 MultiDSClientApprovalStoreProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.storage.MultiDSClientApprovalStoreProvider)1 DSFSClientApprovalStoreProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.storage.filestore.DSFSClientApprovalStoreProvider)1 DSSQLClientApprovalStoreProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.storage.sql.provider.DSSQLClientApprovalStoreProvider)1 ClientApproverConverter (edu.uiuc.ncsa.myproxy.oa4mp.server.util.ClientApproverConverter)1 CfgEvent (edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent)1 ClientApprovalStore (edu.uiuc.ncsa.security.delegation.server.storage.ClientApprovalStore)1 ClientApprovalMemoryStore (edu.uiuc.ncsa.security.delegation.server.storage.impl.ClientApprovalMemoryStore)1 ClientApprovalKeys (edu.uiuc.ncsa.security.delegation.storage.ClientApprovalKeys)1