Reputation: 146
How should I go about performing authentication and authorization during testing for a yesod haskell app? My handlers begin with requireAuth and my authentication plugin is browserID.
So I want to log a user in and do what that handler pertains. Doing this for several handlers.
My code is: https://github.com/urbanslug/payroll-web/tree/development
I have read https://github.com/yesodweb/yesod/wiki/Performing-Authentication-during-Testing but I really don't get it plus it seems outdated since some types like OneSpec are out of scope and aren't on hayoo.
Upvotes: 3
Views: 115
Reputation: 131
The code in that wiki article is now updated. The details in that code are right for the HashDB authentication plugin, but would need to be modified for BrowserID.
Upvotes: 2