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

WebServer: add support of Authorization: Bearer in HTTP header #22

Closed
wants to merge 2 commits into from

Conversation

jcourtat
Copy link
Contributor

This patch implement some parts of RFC 6750 OAuth 2.0 Bearer Token Usage.
Authorization of resource access through the use of a token is limited to
token presence in header fields of HTTP request.

Even if expiration date is not mandatory within tokens, i think most of the time
tokens embeds such data to grant access to resources for a discrete period.
That's why this patch focus on searching for an expiration date within the token,
and store it in a map in case of successful token verification, to speed up next
requests processing with same token.

Since content of tokens is not standardized, callbacks must be provided to keep
the token decode and checks outside of libnavajo.

Signed-off-by: Julien Courtat julien.courtat@aqsacom.com

This patch implement some parts of RFC 6750 OAuth 2.0 Bearer Token Usage.
Authorization of resource access through the use of a token is limited to
token presence in header fields of HTTP request.

Even if expiration date is not mandatory within tokens, i think most of the time
tokens embeds such data to grant access to resources for a discrete period.
That's why this patch focus on searching for an expiration date within the token,
and store it in a map in case of successful token verification, to speed up next
requests processing with same token.

Since content of tokens is not standardized, callbacks must be provided to keep
the token decode and checks outside of libnavajo.

Signed-off-by: Julien Courtat <julien.courtat@aqsacom.com>
@jcourtat
Copy link
Contributor Author

Hello,
This patch allow to pass JWT in HTTP header to a callback for verification.
I'm ready to fix it according to your comments

regards

@jcourtat jcourtat closed this Aug 31, 2017
@jcourtat jcourtat reopened this Aug 31, 2017
@jcourtat
Copy link
Contributor Author

sorry, clicked wrong button

@jcourtat
Copy link
Contributor Author

i forget to initialize the mutex protecting token cache, i will provide a new patch asap

@jcourtat
Copy link
Contributor Author

I have made a patch to fix it, but i don't know how to propose it, should i propose the patch separately or do a new pull request with another branch.
Sorry for my bad testing

Signed-off-by: Julien Courtat <julien.courtat@aqsacom.com>
@jcourtat jcourtat closed this Sep 1, 2017
@jcourtat jcourtat deleted the add_auth_bearer branch September 1, 2017 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant