(default, allow_formplayer=False)
return decorator
:param allow_formplayer: If True this will allow one additional auth mechanism which is used
         by Formplayer:

         - formplayer auth: for SMS forms there is no active user involved in the session and so
             formplayer can not use the session cookie to auth. To allow formplayer access to the
             endpoints we validate each formplayer request using a shared key. See the auth
             function for more details.
:param allow_formplayer: If True this will allow one additional auth mechanism which is used
         by Formplayer:
: param allow_formplayer : If True this will allow one additional auth mechanism which is used by Formplayer :
def get_multi_auth_decorator(default, allow_formplayer=False):
    """
    :param allow_formplayer: If True this will allow one additional auth mechanism which is used
         by Formplayer:

         - formplayer auth: for SMS forms there is no active user involved in the session and so
             formplayer can not use the session cookie to auth. To allow formplayer access to the
             endpoints we validate each formplayer request using a shared key. See the auth
             function for more details.
    """
    def decorator(fn):
        @wraps(fn)
        def _inner(request, *args, **kwargs):
            authtype = determine_authtype_from_request(request, default=default)
            if authtype == FORMPLAYER and not allow_formplayer:
                auth_logger.info(
                    "Request rejected reason=%s request=%s",
                    "formplayer_auth:not_enabled_for_request", request.path
                )
                return HttpResponseForbidden()
            request.auth_type = authtype  # store auth type on request for access in views
            function_wrapper = get_auth_decorator_map(allow_cc_users=True)[authtype]
            return function_wrapper(fn)(request, *args, **kwargs)
        return _inner
    return decorator
def get_multi_auth_decorator ( default , allow_formplayer = False ) : def decorator ( fn ) : @ wraps ( fn ) def _inner ( request , * args , * * kwargs ) : authtype = determine_authtype_from_request ( request , default = default ) if authtype == FORMPLAYER and not allow_formplayer : auth_logger . info ( "Request rejected reason=%s request=%s" , "formplayer_auth:not_enabled_for_request" , request . path ) return HttpResponseForbidden ( ) request . auth_type = authtype # store auth type on request for access in views function_wrapper = get_auth_decorator_map ( allow_cc_users = True ) [ authtype ] return function_wrapper ( fn ) ( request , * args , * * kwargs ) return _inner return decorator