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

Custom authToken key name support #31

Conversation

tarsolya
Copy link

This pull request makes it possible to set a custom a key name for
authTokens inside authenication responses.

The current hardcoded value (access_token) is great for OAuth
authorized APIs, but makes it hard to use SimpleAuth for authentication
with existing, non-Oauth API designs.

Changing an existing API requires more effort, hence the pull request.
It would be nice if you'd accept this, but I understand if you want to
keep it as is :)

@marcoow
Copy link
Member

marcoow commented Nov 13, 2013

Actually I would rather not include that in the library as I really want to keep it slim. However, you can already do that anyway with the support for custom servers - basically you'd just override Session#setup and LoginControllerMixin#tokenRequestOptions.

I'm also currently working on a refactoring that extracts customizable parts of the code into strategies (see #20) which would make customization even easier.

@marcoow marcoow closed this Nov 13, 2013
@tarsolya
Copy link
Author

Right, strategies are obviously a better solution. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants