app/controllers/application_controller.rb
# User Authentication
# Authenticates the user with OAuth2 Resource Owner Password Credentials Grant
User Authentication
Authenticates the user with OAuth2 Resource Owner Password Credentials Grant
User Authentication Authenticates the user with OAuth2 Resource Owner Password Credentials Grant
def authenticate_user_from_token!
    auth_token = request.headers['Authorization']
    if auth_token
      authenticate_with_auth_token(auth_token)
    else
      authentication_error
    end
  end
def authenticate_user_from_token! auth_token = request . headers [ 'Authorization' ] if auth_token authenticate_with_auth_token ( auth_token ) else authentication_error end end
User Authentication
Authenticates the user with OAuth2 Resource Owner Password Credentials Grant
User Authentication Authenticates the user with OAuth2 Resource Owner Password Credentials Grant