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

default use of Bearer for authorization token in auth scheme, for III… #350

Merged
merged 1 commit into from
Apr 3, 2018

Conversation

mejackreed
Copy link
Contributor

…F Auth compliance

Fixes sul-dlss/sul-embed#827
Fixes sul-dlss/sul-embed#856

This change fixes a regression introduced in #221 . The regression switched usage of the authorization header prefix from Bearer to Token. Bearer is required via the IIIF Auth spec and we were not honoring it anymore.

This change should be backwards compatible now accepting both.

@mejackreed
Copy link
Contributor Author

I've tested this on UAT with UV

@coveralls
Copy link

coveralls commented Apr 3, 2018

Coverage Status

Coverage increased (+0.003%) to 96.933% when pulling 07cc7ec on use-bearer-token-for-iiif-auth into 6b4aa46 on master.

@mejackreed mejackreed force-pushed the use-bearer-token-for-iiif-auth branch from f5bf1e4 to 07cc7ec Compare April 3, 2018 16:21
@@ -8,7 +8,7 @@ def create
@message = if token
{
accessToken: token,
tokenType: 'Token',
tokenType: 'Bearer',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think tokenType is gone in IIIF Auth 1.0; I'm not sure if we had backwards compatibility concerns that led us to keep it as-is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I hadn't realized that. /shrug should we remove it?

@cbeer cbeer merged commit 292d3f2 into master Apr 3, 2018
@cbeer cbeer deleted the use-bearer-token-for-iiif-auth branch April 3, 2018 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants