How to use Authorization request in POST #808
Replies: 3 comments
-
You can use the higher level API. Client.do_authorization_request takes |
Beta Was this translation helpful? Give feedback.
-
Thanks @tpazderka. But if i use high level API, it itself trying to do request_and_return and thus i am not able to redirect the enduser to this Authorization end point. As this code is getting executed on the client, client itself trying to do redirect. My requirement is using this module if i can prepare the HTTP POST request, i can redirect the user and user browser will redirect him appropriately. As in my case, client is trying to redirect and i am getting redirect error (Auth error). |
Beta Was this translation helpful? Give feedback.
-
I am not really sure of your usecase and flow. But my note is that trying to do POST redirects usually does not work as browsers tend to throw away the data. You can always prepare everything manually and take an inspiration here. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am trying to use 'POST' method for Authorization request.
I have been using the APIs like this.
args = {
"client_id": client.client_id,
"response_type": "code",
"scope": ["openid"],
"nonce": session["nonce"],
"redirect_uri": client.registration_response["redirect_uris"][0],
"state": session["state"]
}
auth_req = client.construct_AuthorizationRequest(request_args=args)
login_url = auth_req.request(client.authorization_endpoint)
Can somebody explain how we can use "POST" method as GET is default. Do we need to pass any parameter?
Beta Was this translation helpful? Give feedback.
All reactions