gonzalo-bulnes/simple_token_authentication — pull request #143 by vishnun (2014-12-21 12:16:49+00:00)
Title: More flexible configuration and adding a method

The gem was tied with `:email` as the user identifier. Which meant, someone using devise for authentication cannot use this gem for token authentication if their user model has `username` as the attribute in place of `email`.

In this pull-request I've made this key configurable keepinig `:email` as default.

Also, the "email" attribute was by default considered as case insensitive. I once again made it optional by making it configurable.

The gem adds a before_filter to ensure_authentication_token. But in some cases, for better security in case of token theft maybe, a developer may choose to reset the authentication token based on any event.

I've added a method `reset_authentication_token` which is now available for use. Note: The before_save filter remains the same as before - ensure_authentication_token.

Have updated the readme with the above mentioned changes.

- Vishnu Narang
(Let me know if you need any clarification)