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

Update details to inform client why auth failed on token timeouts. #39

Open
mtseD2L opened this issue Mar 3, 2016 · 4 comments
Open

Comments

@mtseD2L
Copy link

mtseD2L commented Mar 3, 2016

suggests that we display "The access token is expired" to the client when a token has expired.

However, when using an expired token, the client is presented with {"title":"Authentication required","status":401,"detail":null}.

We are using:

<package id="D2L.Security.OAuth2" version="4.4.3.0" targetFramework="net452" />
<package id="D2L.Security.OAuth2.WebApi" version="3.3.1.0" targetFramework="net452" />
@j3parker
Copy link
Member

j3parker commented Mar 4, 2016

Huh, we should be returning OAuth 2.0 standard error messages. I know we're very strict about that in the auth service but maybe we're not doing this right for this library.

https://tools.ietf.org/html/rfc6749

@j3parker
Copy link
Member

j3parker commented Mar 4, 2016

FYI @mpharoah-d2l

@mtseD2L
Copy link
Author

mtseD2L commented Mar 4, 2016

I added the package versions we're using.

@mpharoah-d2l
Copy link
Contributor

Do we have a specification for how services that make calls to the Auth Service should respond when authentication fails? I see a bunch of information about how the auth service itself responds to the service, but do we have a standard for how services should relay the error information to the client?

Anyways, the OAuth 2.0 web API defines the format that services respond to the client in here. Don't know if that's the format it's supposed to use or not. Seems wrong since it doesn't have a type field, which I would expect.
It looks like it never sets the detail field on an error, so you just get null.

Also, is a 401 response correct? Doesn't look like we're sending back a WWW-Authenticate header which is supposed to be required for 401 responses.

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