-
Notifications
You must be signed in to change notification settings - Fork 231
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
Adds ability to injects additional headers to token end points. #503
Adds ability to injects additional headers to token end points. #503
Conversation
…so add existing headers to newly created URLSession instance.
Hi @shankarphadatare2, thanks for raising this. The changes to pass custom headers to the For that same reason, the changes to Credentials Manager are no necessary either, since the Credentials Manager accepts an Authentication API client instance via the initializer: https://github.com/auth0/Auth0.swift/blob/master/Auth0/CredentialsManager.swift#L46 So, the only thing that is needed is to add a way to pass a custom URL session when doing web auth. Like, a session property in the initializer, that is analogous to the Authentication API client: https://github.com/auth0/Auth0.swift/blob/master/Auth0/WebAuthenticatable.swift If you want to implement that, we'll accept it as long as it has sufficient tests. But we cannot accept this PR as-is. |
Hi @Widcket, Yeah i agree with you, Can you implement to pass custom URLSession when doing web auth? this way we can pass our URLsession with headers. |
@shankarphadatare2 we don't plan on doing this before the new major, so if you'd prefer to have it sooner we'll be happy to accept a PR as described. |
@Widcket i prefer to have it sooner so we can just switch to your repo release version. |
I'll be closing this PR then, since the changes for the described implementation are completely different. |
@Widcket just want to check, Is this enhancement implemented and released? |
Hi @shankarphadatare2, we're currently working on a new major version of the library, and we'll be adding a way to add custom headers. |
@shankarphadatare2 Auth0.swift 2.0.0-beta.0 is out now, and it includes the ability to specify custom headers. See #637 for more information. |
The 2.0.0 release is out now. Please check the Migration Guide for more information on how to update your apps. |
Changes
Adds ability to injects additional headers to token end points and also add existing headers to newly created URLSession instance.
References
Please include relevant links supporting this change such as a:
Please note any links that are not publicly accessible.
Testing
Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.
Checklist