You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which is supposed to model a form-based login, logout and a protected resource.
This is all fine and works as intended. If I now try and generate client functions, it doesn't compile:
_ = client (Proxy::ProxyAuthAPI)
Error: • No instance for (HasClient
ClientM (Auth '[Cookie] User :> Protected))
arising from a use of ‘client’
• In the expression: client (Proxy :: Proxy AuthAPI)
In a pattern binding: _ = client (Proxy :: Proxy AuthAPI)
|
17 | _ = client (Proxy :: Proxy AuthAPI)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I found out that servant-auth-client- only supports JWT and basic auth, so it probably isn't what I can use here. I'm also aware that there's ongoing discussion in #1484, but to be honest I'm a bit lost in the details and don't know how to proceed here. Is that something that is supported? Or will it be supported in the future? Or do I have to provide my own implementation for a HasClient instance?
I have a minimal working example for that here. It also includes a test, so you can see the compile error here as well.
The text was updated successfully, but these errors were encountered:
I'm currently experimenting with servant-auth and Cookie based authentication and I would like to write a test for such an API using servant-client.
I have the following API definition:
which is supposed to model a form-based login, logout and a protected resource.
This is all fine and works as intended. If I now try and generate client functions, it doesn't compile:
I found out that servant-auth-client- only supports JWT and basic auth, so it probably isn't what I can use here. I'm also aware that there's ongoing discussion in #1484, but to be honest I'm a bit lost in the details and don't know how to proceed here. Is that something that is supported? Or will it be supported in the future? Or do I have to provide my own implementation for a
HasClient
instance?I have a minimal working example for that here. It also includes a test, so you can see the compile error here as well.
The text was updated successfully, but these errors were encountered: