-
Notifications
You must be signed in to change notification settings - Fork 24
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
Documentation update - getting an oauth token from owncloud #295
Comments
I'm going to leave the original comment in place but i've resolved the issue. I did need to set the Authorization header using the clientId and clientSecret to generate the basic auth credential. So now my request looks like:
Note the extra header with the basic auth. This isn't clear in the RFC and it's not mentioned in the oauth docs. An example like this in the oauth documentation would have been nice. |
I tried this solution but it still needs a human as a user to enter the user/pass on the login page. |
related: |
I have an application that lives outside of owncloud that needs to get an access token from owncloud via
the oauth app.
Doing an authorization request client side to get a code works. But when I pass that to my api to get an access token I get an error "invalid_request"
The request I'm constructing is as follows:
According to the RFC : https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3 I might need to add the Authorization header but the docs don't mention it and I don't have the users' name and password anyway.
So, when the request hits the server it fails at https://github.com/owncloud/oauth2/blob/master/lib/Controller/OAuthApiController.php#L122 because the PHP_AUTH_USER and PHP_AUTH_PW var's are not set (I'm guessing
these come from the Authorization header being unpacked?).
Anyway, I can't see how this could ever work from outside the owncloud environment or without the
users' name and password which shouldn't be needed anyway.
Can you help!
Expected behaviour
The access token should be returned.
Actual behaviour
An 'invalid_request' error is thrown.
Server configuration
The text was updated successfully, but these errors were encountered: