rossabaker on gh-pages
updated site (compare)
IOAppand running it
extends Http4sDsl[F]or so
Response[F](Status.Unauthorized)if you’d like to go around the spec, but it clearly indicates a challenge is required.
Ok(“you are not authorized”).map(_.copy(status = Status.Unauthorized))may also work, but these are all workaround for the fact that no challenges are being offered as they are supposed to be.
https://tools.ietf.org/html/rfc7235#section-3.1 - Basically its something to populate the
WWW-Authenticate header field, so you need to provide that header. That header consists of atleast 1 challenge for the caller in order to become authorized.
In the very specific, I'm porting mailgun4s to http4s because it's been a source of frustration.
Specifically these confuse me: https://github.com/outr/mailgun4s/blob/master/src/main/scala/org/matthicks/mailgun/Mailgun.scala#L91-L98
Referring to this: https://documentation.mailgun.com/en/latest/api-sending.html#sending
I have most of the other code in that file (and the related data types) ported already