INNER CODE UNIT · Python

get_remote_user

bobbui/json-logging-python · json_logging/framework/connexion/__init__.py:154

    def get_remote_user(self, request):
        if _is_async_request(request):
            # AsyncApp requests carry no parsed authorization, the user is only known to the security handlers
            return json_logging.EMPTY_VALUE
        if request.authorization is not None:
            return request.authorization.username
        else:
            return json_logging.EMPTY_VALUE

    def get_http_header(self, request, header_name, default=None):
        try:
            if header_name in request.headers:
                return request.headers.get(header_name)
        except:
            pass
        return default

    def set_correlation_id(self, request_, value):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…