Closed pjechris closed 8 years ago
The code you're quoting is a class function that just converts the params
dictionary into a string.
But yes, additional params are not yet forwarded to the token refresh call. What is the additional parameter, has it to do with authentication? Is it the same parameter you're sending during the authorize call or is it separate?
It is used by my OpenAM server to identify which realm to use for identification. Maybe I can find a way to configure it directly on the server. Nonetheless behaviour is not consistent as token_uri is unchanged when requesting an access_token while being modified when refreshing one.
So parameter is the same during auth and refresh?
Can you show how token_uri is not changed and what changes when refreshing? I'm not sure I follow.
my token_uri is "https://servername.com/oauth2/access_token?realm=/gvd". When requesting an access token, url is ""https://servername.com/oauth2/access_token?realm=/gvd". When refreshing the token, url becomes "https://servername.com/oauth2/access_token". My query parameter is missing making request to fail.
Ok thanks, that helps. The way it should work is that you use https://servername.com/oauth2/access_token
as token_uri and then pass the extra parameter during authorize:
oauth2.authorize(params: ["realm": "/gvd"])
Right now these parameters are not forwarded to the token refresh call, which seems they should.
I've just pushed an update to master
, can you test whether refresh now works, using it as shown in my previous comment?
Ok it works, thanks!
Hi there,
I'm stuck while trying to refreshing a token. My token_uri does contain a query parameter that is required by my OAuth agent. This query parameter is succesfully sended when requiring an access_token but wiped away when refreshing it. From what I've seen in code, there's something strange happening inside
authorizeURLWithParams
:=> query parameters are replaced by Oauth2 parameters (which will be moved into HTTP body request later on).
Thanks,