Sha256: 82afb9a84dc34abf2ffc1aa58bdebfe3bf82aef66afdd15548124a355ad4e5ed

Contents?: true

Size: 308 Bytes

Versions: 23

Compression:

Stored size: 308 Bytes

Contents

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

  before_action :decode_jwt

  ##
  ## private
  ##
  private

  def decode_jwt
    byebug
    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

23 entries across 23 versions & 1 rubygems

Version Path
wco_models-3.1.0.189 app/controllers/wco/api_controller.rb
wco_models-3.1.0.188 app/controllers/wco/api_controller.rb
wco_models-3.1.0.187 app/controllers/wco/api_controller.rb
wco_models-3.1.0.184 app/controllers/wco/api_controller.rb
wco_models-3.1.0.183 app/controllers/wco/api_controller.rb
wco_models-3.1.0.182 app/controllers/wco/api_controller.rb
wco_models-3.1.0.181 app/controllers/wco/api_controller.rb
wco_models-3.1.0.180 app/controllers/wco/api_controller.rb
wco_models-3.1.0.178 app/controllers/wco/api_controller.rb
wco_models-3.1.0.177 app/controllers/wco/api_controller.rb
wco_models-3.1.0.176 app/controllers/wco/api_controller.rb
wco_models-3.1.0.175 app/controllers/wco/api_controller.rb
wco_models-3.1.0.174 app/controllers/wco/api_controller.rb
wco_models-3.1.0.173 app/controllers/wco/api_controller.rb
wco_models-3.1.0.172 app/controllers/wco/api_controller.rb
wco_models-3.1.0.171 app/controllers/wco/api_controller.rb
wco_models-3.1.0.170 app/controllers/wco/api_controller.rb
wco_models-3.1.0.169 app/controllers/wco/api_controller.rb
wco_models-3.1.0.168 app/controllers/wco/api_controller.rb
wco_models-3.1.0.167 app/controllers/wco/api_controller.rb