-
Notifications
You must be signed in to change notification settings - Fork 259
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
No grant found for state #368
Comments
You are trying to get an access token without authorization first. You should do |
this gives me a html-response wich is the login-page of keycloak - so nothing to use with Resource Owner Password Credentials Grant this was also the problem with the example for the Authorization code flow
is no option as it requires to redirect to the keycloak where the user needs then to sign in also doing just a post-request to the token-endpoint with the given args returns an access_token |
That is correct, the user has to log in before getting the info about them. |
Right - thats totally clear - my problem is, that I need to provide any Information via API - the python script gets user and password and than authenticates the user against the keycloak info - after some research I found to use Resource Owner Password Credentials Grant this way it should be (and actually is, as tested and stated above) possible to just receive the access_token, id_token and refresh_token needed. But now I would like to integrate that into the Client object - and best practise would be to use the functions of the object itself, rather then passing information from external requests - what is your Best Practise for using pyoidc with Resource Owner Password Credentials Grant? |
Ah, OK. I haven't used |
@pkoffdeff, we're very lacking in documentation and I really don't think there is a best practice 😄 It's up to you! If you get something working, please do report back and consider bringing anything you learn upstream. |
I try to do an openid login (at keycloak) for an api with the Resource Owner Password Credentials Grant
(https://tools.ietf.org/html/rfc6749#section-4.3) via the following code:
But everytime I get: GrantError: No grant found for state:'XXX'
I think at this moment should be no grant availiable, as the client is not even authenticated (different from the Authorization Code Flow as in the docs)
For interest the Traceback is:
The text was updated successfully, but these errors were encountered: