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

Unable to get AccessToken using AuthorizationConnector #120

Closed
PatrickFermont opened this issue Nov 19, 2020 · 4 comments
Closed

Unable to get AccessToken using AuthorizationConnector #120

PatrickFermont opened this issue Nov 19, 2020 · 4 comments

Comments

@PatrickFermont
Copy link

When trying to get AccessToken using the AuthorizationConnector I always get back 403.
Inspecting the headers I see that behinds client-secret a "comma and space" is added.

AuthorizationConnector authorizationConnector = new AuthorizationConnector();
return authorizationConnector.GetAccessToken(authorizationCode, "AB1234"); 

When I do the same in Postman (so without "comma and space") I get the AccessToken.

Do I miss something?

@PatrickFermont
Copy link
Author

PatrickFermont commented Nov 19, 2020

Using NuGet package Version 3.3.6 works fine so it must be somewhere between 3.3.6 and latest version.

@richardrandak
Copy link
Collaborator

It is a bug, I'll fix it

richardrandak added a commit that referenced this issue Nov 20, 2020
@richardrandak
Copy link
Collaborator

richardrandak commented Nov 20, 2020

I released the fix.
Problem was that the credentials (client secret and access token) were put to headers by the BaseClient, which is inherited by all connectors.
In case of AuthorizationConnector, the credentials are not yet known and should not be used. By adding them, the undefined/empty client secret was put second time (that's why the comma appeared)

Note, I created the fix on top of hidden release 3.5.0, which had some changes in interface. You may need to adapt the code if you download the release 3.5.1 containing this fix.

@PatrickFermont
Copy link
Author

Solved. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants