title: Django rest framework: Obtain auth token using email instead username
body: <p>I'm working on a project to enable the django rest framework authentication for mobile devices. I'm using the default token authentication for get the user token from a post request sending username and password.</p>
  
  <pre><code>curl --data "username=username&amp;password=password" http://127.0.0.1:8000/api/api-token-auth/
  </code></pre>
  
  <p>(api/api-token-auth/ is the url configured with the obtain_auth_token view)</p>
  
  <pre><code>urlpatterns = [
      url(r'^api/api-token-auth/', obtain_auth_token),
      url(r'^', include(router.urls)),
  ]
  </code></pre>
  
  <p>and the response is the user token.</p>
  
  <pre><code>{"token":"c8a8777aca969ea3a164967ec3bb341a3495d234"}
  </code></pre>
  
  <p>I need to obtain the user token auth using email-password on the post instead username-password, or both. I was reading the documentation of custom authentication <a href="http://www.django-rest-framework.org/api-guide/authentication/#custom-authentication" rel="noreferrer">http://www.django-rest-framework.org/api-guide/authentication/#custom-authentication</a>... but really, isn't very clear to me.
  It's very helpful to me... thanks :).</p>