Sha256: 0571b622fd8c345d0a6c3531a76945dda22da19b67cbb5ca7bb75ddb2fcb3c53

Contents?: true

Size: 297 Bytes

Versions: 9

Compression:

Stored size: 297 Bytes

Contents

class Iro::ApiController < ActionController::Base
  layout false

  before_action :decode_jwt

  ##
  ## private
  ##
  private

  def decode_jwt
    out = JWT.decode params[:jwt_token], nil, false
    email = out[0]['email']
    user = User.find_by({ email: email })
    sign_in user
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
iron_warbler-2.0.7.28 app/controllers/iro/api_controller.rb
iron_warbler-2.0.7.27 app/controllers/iro/api_controller.rb
iron_warbler-2.0.7.26 app/controllers/iro/api_controller.rb
iron_warbler-2.0.7.25 app/controllers/iro/api_controller.rb
iron_warbler-2.0.7.24 app/controllers/iro/api_controller.rb
iron_warbler-2.0.7.23 app/controllers/iro/api_controller.rb
iron_warbler-2.0.7.22 app/controllers/iro/api_controller.rb
iron_warbler-2.0.7.21 app/controllers/iro/api_controller.rb
iron_warbler-2.0.7.20 app/controllers/iro/api_controller.rb