|
15 | 15 | from oidcservice.util import URL_ENCODED |
16 | 16 | from oidcservice.util import get_http_body |
17 | 17 | from oidcservice.util import get_http_url |
18 | | -from oidcservice.util import importer |
19 | 18 |
|
20 | 19 | __author__ = 'Roland Hedberg' |
21 | 20 |
|
@@ -512,44 +511,6 @@ def get_conf_attr(self, attr, default=None): |
512 | 511 | return default |
513 | 512 |
|
514 | 513 |
|
515 | | -# def build_services(service_definitions, service_factory, module_dirs, |
516 | | -# service_context, state_db, client_authn_factory=None): |
517 | | -# """ |
518 | | -# This function will build a number of :py:class:`oidcservice.service.Service` |
519 | | -# instances based on the service definitions provided. |
520 | | -# |
521 | | -# :param service_definitions: A dictionary of service definitions. The keys |
522 | | -# are the names of the subclasses. The values are configurations. |
523 | | -# :param service_factory: A factory that can initiate a service class |
524 | | -# :param module_dirs: The directories in which to search for service modules. |
525 | | -# Directory names are expected to be relative to the oidcservice package. |
526 | | -# e.g. ['oidc', 'oauth2]. The directories will be search in order until |
527 | | -# a matching module is found. |
528 | | -# :param service_context: A reference to the service context, this is the same |
529 | | -# for all service instances. |
530 | | -# :param state_db: A reference to the state database. Shared by all the |
531 | | -# services. |
532 | | -# :param client_authn_factory: A list of methods the services can use to |
533 | | -# authenticate the client to a service. |
534 | | -# :return: A dictionary, with service name as key and the service instance as |
535 | | -# value. |
536 | | -# """ |
537 | | -# service = {} |
538 | | -# for service_name, service_configuration in service_definitions.items(): |
539 | | -# _srv = service_factory(service_name, |
540 | | -# module_dirs, |
541 | | -# service_context=service_context, |
542 | | -# state_db=state_db, |
543 | | -# client_authn_factory=client_authn_factory, |
544 | | -# conf=service_configuration) |
545 | | -# try: |
546 | | -# service[_srv.service_name] = _srv |
547 | | -# except AttributeError: |
548 | | -# raise ValueError("Could not load '{}'".format(service_name)) |
549 | | -# |
550 | | -# return service |
551 | | - |
552 | | - |
553 | 514 | def init_services(service_definitions, service_context, state_db, |
554 | 515 | client_authn_factory=None): |
555 | 516 | """ |
|
0 commit comments