'Set the :term:`CSRF storage policy` used by subsequent view
registrations.
``policy`` is a class that implements the
:meth:`pyramid.interfaces.ICSRFStoragePolicy` interface and defines
how to generate and persist CSRF tokens.'

@action_method
def set_csrf_storage_policy(self, policy):

    def register():
        self.registry.registerUtility(policy, ICSRFStoragePolicy)
    intr = self.introspectable('csrf    storage    policy', None, policy, 'csrf    storage    policy')
    intr['policy'] = policy
    self.action(ICSRFStoragePolicy, register, introspectables=(intr,))
