Sha256: 49964ae94cc31dc1d5942b14b4846ce72bd7bbca65ac28dec20b014814d29df6
Contents?: true
Size: 561 Bytes
Versions: 9
Compression:
Stored size: 561 Bytes
Contents
module Notee class ApplicationController < ActionController::Base before_action :set_access_token before_action :restrict_access_json private def set_access_token # request['Authorization: Token token'] = session[:access_token] if session[:access_token].present? end def restrict_access_json # authenticate_or_request_with_http_token do |token, options| # Token.exists?(access_token: token) # end unless Token.exists?(access_token: session[:access_token]) raise end end end end
Version data entries
9 entries across 9 versions & 1 rubygems