Fork me on GitHub
#liberator
<
2017-03-21
>
bostonaholic15:03:30

what, libraries and methods, are people using for authentication?

ordnungswidrig16:03:34

I know that buddy was used sucessfully with liberator, although it needs some glue code. In the end all you need to do is to implement the :authorized? decision to check for authorization and make sure the necessary headers are set in the response.

bostonaholic16:03:14

so it’s preferred over ring middleware?

ordnungswidrig16:03:32

not necessarily. You can take advantage of ring middleware within liberator. Say, some authentication middleware set’s a special request attribute :auth-middleware/authorized? you can inspect that value in authorized? and act accordingly.

bostonaholic16:03:59

ah, that makes total sense

ordnungswidrig16:03:00

If false, return false and maybe update the context to override the middleware response.

ordnungswidrig16:03:27

Or maybe you can just fallback to the middleware and rely on the fact it would return a 403 response

bostonaholic16:03:55

I’m also looking into friend, but it is not making any sense to me

ordnungswidrig16:03:03

Friend is very powerful but to my knowledge hard to integrate with liberator. If you can use it simply as a wrapper then fine. The liberator resources can ignore authentication all together and consider it handled.

bostonaholic16:03:06

so if I chose friend, probably best to separate liberator resources from friend

ordnungswidrig16:03:40

Liberator at least didn’t change fundamentally in the last 3 years 😉

bostonaholic16:03:40

I’ve been reading that, and was concerned with the age of the post

bostonaholic16:03:59

heh, that’s true

ordnungswidrig16:03:17

you’re welcome 🙂