human
I wrote the below code

    @wraps(func)
    def process(request, *args, **kwargs):
        request.authkey = None
        if (not settings.MAINTENANCE_MODE):
            http_auth = request.META.get('HTTP_AUTHORIZATION', '')
            if http_auth:
                try:
                    (basic, b64_auth) = http_auth.split('    ', 1)
                    if ('Basic' == basic):
                        auth = base64.decodestring(b64_auth)
                        (key_id, secret) = auth.split(':', 1)
                        key = Key.objects.get(key=key_id)
                        if key.check_secret(secret):
                            request.authkey = key
                            request.user = key.user
                except (binascii.Error, ValueError, Key.DoesNotExist):
                    pass
        return func(request, *args, **kwargs)
    return process

What's a good function header?
assistant
#Here's a good function header.

def accepts_auth_key(func):