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

Handling redirects with auth parameter? #1469

Closed
CasperWSchmidt opened this issue Jun 3, 2020 · 8 comments
Closed

Handling redirects with auth parameter? #1469

CasperWSchmidt opened this issue Jun 3, 2020 · 8 comments
Labels

Comments

@CasperWSchmidt
Copy link

In #414 a possible fix for handling auth parameters on redirects is suggested. The IRestRequest.Credentials property are marked as obsolete however. So I'm wondering how this could/should be handled these days?

@alexeyzimarev
Copy link
Member

@CasperWSchmidt it's a warning for the future change. The Credentials property is only for NTML, not for Basic Auth as far as I remember. In the issue you mentioned, the Auth header is added in addition to setting credentials and you might try even removing the request.Credentials assignment there and check if it would still work (it might).

@CasperWSchmidt
Copy link
Author

CasperWSchmidt commented Jun 16, 2020

@alexeyzimarev I know it's a warning for the future, thats why I don't like to be dependent on that property - it might be removed in the next release :)

What I need to accomplish is, using OAuth 2, to re-add credentials to the request when following a redirect. We have a POST end-point for searching that returns a 307 (IIRC) for the client to follow for the result of the search. All endpoints are secured using OAuth. I know this is disabled by default for security reasons, but our RestSharp helper-class is only used to call internal REST APIs.

@stale
Copy link

stale bot commented Sep 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 14, 2020
@repo-ranger
Copy link

repo-ranger bot commented Sep 14, 2020

⚠️ This issue has been marked wontfix and will be closed in 3 days

@CasperWSchmidt
Copy link
Author

@alexeyzimarev any ideas how to solve the problem mentioned above?

@stale stale bot removed the wontfix label Sep 14, 2020
@alexeyzimarev
Copy link
Member

I don't know to be honest since RestSharp is just a convenience wrapper around the HttpWebRequest and can do just as much as the underlying .NET infrastructure allows us to do. I am open to suggestions but frankly, I have no idea.

@stale
Copy link

stale bot commented Dec 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 13, 2020
@repo-ranger
Copy link

repo-ranger bot commented Dec 13, 2020

⚠️ This issue has been marked wontfix and will be closed in 3 days

@repo-ranger repo-ranger bot closed this as completed Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants