Sha256: 390c6a66144ff5397ec95742b4a6bda3f74cf1fe05d16f841db1646486bdfe6a

Contents?: true

Size: 380 Bytes

Versions: 15

Compression:

Stored size: 380 Bytes

Contents

module Skydrive
  class SessionController < ApplicationController
    def create
      user = User.where("username = ? OR email = ?", params[:username_or_email], params[:username_or_email]).first
      if user && user.authenticate(params[:password])
        render json: user.session_api_key, status: 201
      else
        render json: {}, status: 401
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
lti_skydrive-1.1.0 app/controllers/skydrive/session_controller.rb
lti_skydrive-1.0.7 app/controllers/skydrive/session_controller.rb
lti_skydrive-1.0.6 app/controllers/skydrive/session_controller.rb
lti_skydrive-1.0.5 app/controllers/skydrive/session_controller.rb
lti_skydrive-1.0.4 app/controllers/skydrive/session_controller.rb
lti_skydrive-1.0.3 app/controllers/skydrive/session_controller.rb
lti_skydrive-1.0.2 app/controllers/skydrive/session_controller.rb
lti_skydrive-1.0.0 app/controllers/skydrive/session_controller.rb
lti_skydrive-0.1.1 app/controllers/skydrive/session_controller.rb
lti_skydrive-0.1.0 app/controllers/skydrive/session_controller.rb
lti_skydrive-0.0.5 app/controllers/skydrive/session_controller.rb
lti_skydrive-0.0.4 app/controllers/skydrive/session_controller.rb
lti_skydrive-0.0.3 app/controllers/skydrive/session_controller.rb
lti_skydrive-0.0.2 app/controllers/skydrive/session_controller.rb
lti_skydrive-0.0.1 app/controllers/skydrive/session_controller.rb