def __init__(self, prefix, identifier, config, klass, auth):
        """Initialize IIIFHandler setting key configurations.

        Positional parameters:
        prefix -- URI prefix (without leading or trailing slashes)
        identifier -- identifier of image
        config -- instance of Config class
        klass -- IIIFManipulator sub-class to do manipulations
        auth -- IIIFAuth sub-class instance for auth or None
        """
        self.prefix = prefix
        self.identifier = identifier
        self.config = config
        self.klass = klass
        self.api_version = config.api_version
        self.auth = auth
        self.degraded = False
        self.logger = logging.getLogger('IIIFHandler')
        #
        # Create objects to process request
        self.iiif = IIIFRequest(api_version=self.api_version,
                                identifier=self.identifier)
        self.manipulator = klass(api_version=self.api_version)
        #
        # Set up auth object with locations if not already done
        if (self.auth and not self.auth.login_uri):
            self.auth.login_uri = self.server_and_prefix + '/login'
            if (self.auth.logout_handler is not None):
                self.auth.logout_uri = self.server_and_prefix + '/logout'
            self.auth.access_token_uri = self.server_and_prefix + '/token'
        #
        # Response headers
        # -- All responses should have CORS header
        self.headers = {'Access-control-allow-origin': '*'}
def __init__ ( self , prefix , identifier , config , klass , auth ) : self . prefix = prefix self . identifier = identifier self . config = config self . klass = klass self . api_version = config . api_version self . auth = auth self . degraded = False self . logger = logging . getLogger ( 'IIIFHandler' ) self . iiif = IIIFRequest ( api_version = self . api_version , identifier = self . identifier ) self . manipulator = klass ( api_version = self . api_version ) if ( self . auth and not self . auth . login_uri ) : self . auth . login_uri = self . server_and_prefix + '/login' if ( self . auth . logout_handler is not None ) : self . auth . logout_uri = self . server_and_prefix + '/logout' self . auth . access_token_uri = self . server_and_prefix + '/token' self . headers = { 'Access-control-allow-origin' : '*' }
Initialize IIIFHandler setting key configurations.

        Positional parameters:
        prefix -- URI prefix (without leading or trailing slashes)
        identifier -- identifier of image
        config -- instance of Config class
        klass -- IIIFManipulator sub-class to do manipulations
        auth -- IIIFAuth sub-class instance for auth or None