Closed ArtSabintsev closed 11 years ago
already supports that. params are email
and password
if there is a bug, please create a new issue w/ steps to reproduce.
closing this.
##
# Ensures User matching the given credentials has a single sign on token and returns it.
# Either supply 3rd party credentials or email/password.
#
# If given credentials are valid, but don't match any user, a new User will be created.
#
# That token can be used to authenticate against the api by including with an HTTP request as the value
# for the parameter auth_token. For example: http://api.gt.shelby.tv/v1/dashboard?auth_token=sF7waBf8jBMqsxeskPp2
#
# [POST] /v1/token
#
# All following third party credentials are Optional if you're using email/password
# @param [Required, String] provider_name The name of the 3rd party provider the user is authorized with (ie. "twitter")
# @param [Required, String] uid The id of the User at the 3rd party
# @param [Required, String] token The oAuth token of this User at said provider
# @param [Optional, String] secret The oAuth secret of this User at said provider (if used by the provider)
#
# Email/password are both Optional if you're using third party credentials
# @param [Required, String] email The email address associated with a user (used in conjuction with password)
# @param [Required, String] password The plaintext password (use HTTPS) to verify [Required if using email]
#
# @return [User] User w/ authentication token
#
The enhancement was for the route accepting a username in place of an email address (and still requiring a pasword). Do you see a technical reason to require email over nickname?
I read too quickly. That's fine. Should be just like AuthenticationsController#login
Confirmed working on my end - thank you!
The v1/token route should also be able to take a user's username and password.