However, the way of accessing AuthManager from ChildHelper is to pass
the AuthManager lens into ChildHelper. Then from within ChildHelper
you can use that lens and the withTop function to do things with the
auth snaplet.
There are two levels of HasAuth convenience. The first level is just
the existence of the HasAuth type class. You can easily bolt this on
in your own code with no changes at all to the snap project. This
allows you to avoid passing the lens around everywhere, but still
requires you to use "with authLens" everywhere (where authLens is
defined by HasAuth).
The second level of convenience is where all the existing functions in
the auth API are modified to use authLens. In general this would
result in type signatures changing from
Handler b (AuthManager b) a
to
HasAuth b => Handler b v a
This change is what I was referring to and does limit developers to a
single instance of the auth snaplet.