yada

2017-10-09T03:47:59.000044Z

hi guys, how can I handle authentication using JWT in a HTTP header? I've taken a little dive into the source code and tried providing a custom :verify handler in the :access-control map but got a cryptic error about not being able to create the resource, something like :error :access-control :realm "default" not (namespace :verify) (don't remember which bracket goes where)

danielcompton 2017-10-09T07:37:33.000064Z

It means that you're trying to put the verify function at the wrong level

danielcompton 2017-10-09T07:37:49.000340Z

yada only expects a certain set of unqualified keywords at each level of the map

danielcompton 2017-10-09T07:38:14.000120Z

you'll need to show the full error, also helpful is to show the ex-data for the exception

danielcompton 2017-10-09T08:47:32.000425Z

Am I looking at :exists? correctly in the issue above, or am I misunderstanding what it's for?

malcolmsparks 2017-10-09T09:00:50.000383Z

It is for allowing properties to sat that a resource doesn't exist so the response fn doesn't need to be called at.

malcolmsparks 2017-10-09T09:00:56.000014Z

all

malcolmsparks 2017-10-09T09:02:11.000095Z

A PUT to a resource that doesn't exist is quite valid.

malcolmsparks 2017-10-09T09:02:18.000481Z

As is a POST

malcolmsparks 2017-10-09T09:02:30.000289Z

But a GET would be 404

malcolmsparks 2017-10-09T09:02:43.000056Z

Depends on the method's semantics

danielcompton 2017-10-09T09:14:18.000016Z

So if I want to return 404 to a PUT, then I need to return it myself?

danielcompton 2017-10-09T09:14:24.000150Z

Fair enough

malcolmsparks 2017-10-09T09:24:52.000230Z

Yes

malcolmsparks 2017-10-09T09:26:22.000252Z

Yada can't know what your intent is.

malcolmsparks 2017-10-09T09:27:00.000211Z

It has to call your response function when the semantics of the method are undefined.

👍 1