heliumdatacommons / auth_microservice

Microservice which abstracts out OAuth2/OpenID exchanges and token management from applications
4 stars 5 forks source link

Store+return email field in addition to user_name #29

Open theferrit32 opened 5 years ago

theferrit32 commented 5 years ago

Some use cases rely on there being an associated email address with a given identity, and the user_name is not sufficient. Since most identity providers include an associated email address already, look for this in the token response, and if present, store it and return it to clients

theferrit32 commented 5 years ago

This requires changes because some services don't use email as the identity. Some use a user@domain.ext but have it be something that is not valid email address (example: Harvard, UNC-CH).

theferrit32 commented 5 years ago

User model will be updated to include an email field, which requires django database migrations.

Value of email field will default to null/None

theferrit32 commented 5 years ago

Value of email field will default to empty string

theferrit32 commented 5 years ago

Value should be added to /token response