Returns the targeted frontend and original state

        :type context: satosa.context.Context
        :rtype satosa.frontends.base.FrontendModule

        :param context: The response context
        :return: frontend
15341
def frontend_routing(self, context):
        

        target_frontend = context.state[STATE_KEY]
        satosa_logging(logger, logging.DEBUG, "Routing to frontend: %s " % target_frontend, context.state)
        context.target_frontend = target_frontend
        frontend = self.frontends[context.target_frontend]["instance"]
        return frontend
410726
def get_context():
    
    pid = os.getpid()
    if pid not in context:
        context[pid] = zmq.Context()
        logger.debug('renewed context for PID %d', pid)
    return context[pid]
434584
def get_context_data(self, **kwargs):
        
        context = super(CapabilityView, self).get_context_data(**kwargs)
        context.update({'protocol': PROTOCOL,
                        'copyright': COPYRIGHT,
                        'feeds_format': FEEDS_FORMAT,
                        'site': Site.objects.get_current()})
        return context
247794
def available(self, context):
	
		
		if self.__available is None:
			state = self.__inst.state(context)
			self.__available = state is not None and state != "not_created"
		return self.__available
499220
def token_endpoint(self, context):
        
        headers = {"Authorization": context.request_authorization}
        try:
            response = self.provider.handle_token_request(urlencode(context.request), headers)
            return Response(response.to_json(), content="application/json")
        except InvalidClientAuthentication as e:
            logger.debug('invalid client authentication at token endpoint', exc_info=True)
            error_resp = TokenErrorResponse(error='invalid_client', error_description=str(e))
            response = Unauthorized(error_resp.to_json(), headers=[("WWW-Authenticate", "Basic")],
                                    content="application/json")
            return response
        except OAuthError as e:
            logger.debug('invalid request: %s', str(e), exc_info=True)
            error_resp = TokenErrorResponse(error=e.oauth_error, error_description=str(e))
            return BadRequest(error_resp.to_json(), content="application/json")
641215
def context(self):
        
        ret = libxml2mod.xmlXPathParserGetContext(self._o)
        if ret is None:raise xpathError('xmlXPathParserGetContext() failed')
        __tmp = xpathContext(_obj=ret)
        return __tmp
1216516
async function getContext(target, contextOptions) {
	if (isURL(target)) {
		const cdef = await got(target)
			.then(response => {
				const contentType = response.headers["content-type"]
				switch (contentType) {
					case 'application/x-yaml':
					case 'application/x-yml':
						return yaml.load(response.body)
					case 'application/json':
					case 'application/ld+json':
						return JSON.parse(response.body)
					default:
						throw new Error(`context type not recognized ${contentType}`)
				}
			})
		return new Context(cdef, contextOptions)
	} else {
		return loadContext(target, contextOptions)
	}
}
165323
def jwks(self, context):
        
        return Response(json.dumps(self.provider.jwks), content="application/json")
586267
def get_context_data(self, **kwargs):
        '''
        
        '''
        context = super(PageDetail, self).get_context_data(**kwargs)
        page_base_template = "nupages/base.html"
        # if MultiTenantMiddleware is used, use a base template specific to 
        # the tenants SITE_ID
        if hasattr(self.request, 'site_id'):
            page_base_template = select_template(
                ["nupages/tenants/{}/base.html".format(self.request.site_id), 
                page_base_template])
        context['base_template'] = page_base_template
        return context
1315251
def get_context_data(self, **kwargs):
        
        context = super(BaseEntryChannel, self).get_context_data(**kwargs)
        context.update({'query': self.query})
        return context
205996
function (context) {
    var maskedContext = this._maskContext(context);
    if ("development" !== 'production') {
      var Component = this._currentElement.type;
      if (Component.contextTypes) {
        this._checkContextTypes(Component.contextTypes, maskedContext, ReactPropTypeLocations.context);
      }
    }
    return maskedContext;
  }
889474
def resolve_context(self):
        
        merged = dict()
        for context in self.located_context.values():
            merged.update(context)
        return merged
292218
def render_to_response(self, context, **response_kwargs):
        
        response_kwargs['content_type'] = 'application/json'
        return self.response_class(
            self.convert_context_to_json(context),
            **response_kwargs
        )
1318327
def disco_response(self, context):
        
        info = context.request
        state = context.state

        try:
            entity_id = info["entityID"]
        except KeyError as err:
            satosa_logging(logger, logging.DEBUG, "No IDP chosen for state", state, exc_info=True)
            raise SATOSAAuthenticationError(state, "No IDP chosen") from err

        return self.authn_request(context, entity_id)
740773
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return ExecutionContextInstance(
            self._version,
            payload,
            flow_sid=self._solution['flow_sid'],
            execution_sid=self._solution['execution_sid'],
        )
476166
def _make_resolve_context(self):
        
        if self._is_missing_tags_strict():
            return context_get
        # Otherwise, ignore missing tags.

        def resolve_context(stack, name):
            try:
                return context_get(stack, name)
            except KeyNotFoundError:
                return u''

        return resolve_context
852413
def get_context_data(self, **kwargs):
        
        context = super(BaseTagDetail, self).get_context_data(**kwargs)
        context['tag'] = self.tag
        return context