Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document available options #59

Open
deadghost opened this issue Dec 23, 2016 · 2 comments
Open

Document available options #59

deadghost opened this issue Dec 23, 2016 · 2 comments

Comments

@deadghost
Copy link
Contributor

deadghost commented Dec 23, 2016

I'm having difficulty figuring out how all the middleware and options work together.

There are three middleware: wrap-access-rules, wrap-authentication, wrap-authorization. How do these work together and which are necessary? It seems like if I use wrap-access-rules, I may omit wrap-authorization.

What options are available for backends? I see :unauthorized-handler, does a :unauthenticated-handler exist?
What options are available for wrap-access-rules? I see :rules and :on-error. Does/should :on-error handle unauthenticated requests? Unauthorized requests? When should :on-error be used instead of the :unauthorized-handler option specified in the backend?

These concerns should be better documented.

@niwinz
Copy link
Member

niwinz commented Dec 25, 2016

Thanks for the suggestion, I'll try to improve the documentation with your considerations.

@niwinz niwinz self-assigned this Dec 25, 2016
@morgancmartin
Copy link

Just adding on to this:

The token backends (jws/jwe/token) will not authenticate a request unless a token-name is specified when creating the backend. I followed your jws-backend example (which does not specify a :token-name) and was unable to properly authenticate my requests. It took a fair amount of digging into the source to figure out that it was the lack of a :token-name that was causing it to silently fail.

So, either I missed something in the docs/example, or the docs/example need to be updated to reflect the necessity of the :token-name. And it would likely make sense to go one step further and just document all of the options passed to the backends.

I would be happy (and honored!) to make a PR if you'd like. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants