def initialize_authn(cls, config, authNInstance): cls.should_reload_authn_config = cspace.getConfigOptionWithSection( cls.config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_SHOULD_RELOAD_CONFIG ) CSpaceAuthN.initialize(cls.handleAuthNRequest) if config and authNInstance: # # Read the required params from the config file # authNInstance.realm = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_REALM_PROPERTY ) authNInstance.uri = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_URI_PROPERTY ) authNInstance.hostname = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_HOSTNAME_PROPERTY ) authNInstance.protocol = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_PROTOCOL_PROPERTY ) authNInstance.port = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_PORT_PROPERTY ) authNInstance.tenant = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_TENANT_PROPERTY ) logger.info("AuthN initialized")
def initialize_authn(cls, config, authNInstance): cls.should_reload_authn_config = cspace.getConfigOptionWithSection( cls.config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_SHOULD_RELOAD_CONFIG) CSpaceAuthN.initialize(cls.handleAuthNRequest) if config and authNInstance: # # Read the required params from the config file # authNInstance.realm = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_REALM_PROPERTY) authNInstance.uri = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_URI_PROPERTY) authNInstance.hostname = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_HOSTNAME_PROPERTY) authNInstance.protocol = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_PROTOCOL_PROPERTY) authNInstance.port = cspace.getConfigOptionWithSection( config, cspace.CONFIGSECTION_AUTHN_CONNECT, cspace.CSPACE_PORT_PROPERTY) logger.info('AuthN initialized')
from authn.authn import CSpaceAuthN # def initialize(realm=None, uri=None, hostname=None, protocol=HTTP_PROTOCOL, port=None): CSpaceAuthN.initialize(None, "cow", None, None, "8180")