yesod-auth-1.6.10.1: Authentication for Yesod.
Safe HaskellNone
LanguageHaskell2010

Yesod.Auth.Dummy

Description

Provides a dummy authentication module that simply lets a user specify their identifier. This is not intended for real world use, just for testing. This plugin supports form submissions via JSON (since 1.6.8).

Using the JSON Login Endpoint

We are assuming that you have declared authRoute as follows

      Just $ AuthR LoginR

If you are using a different one, then you have to adjust the endpoint accordingly.

      Endpoint: /auth/page/dummy
      Method: POST
      JSON Data: {
                     "ident": "my identifier"
                 }

Remember to add the following headers:

  • Accept: application/json
  • Content-Type: application/json

Documentation