lib/alondra/session_parser.rb in alondra-0.0.3 vs lib/alondra/session_parser.rb in alondra-0.0.4
- old
+ new
@@ -27,22 +27,22 @@
session_key = Rails.application.config.session_options[:key]
encoded_session = cookies.detect{|c| c.include?(session_key)}.gsub("#{session_key}=",'').strip
verifier.verify(CGI.unescape(encoded_session))
rescue ActiveSupport::MessageVerifier::InvalidSignature => ex
- Rails.logger.error "invalid session cookie: #{cookie}"
+ Log.error "invalid session cookie: #{cookie}"
Hash.new
rescue Exception => ex
- Rails.logger.error "Exception parsing session from cookie: #{ex.message}"
+ Log.error "Exception parsing session from cookie: #{ex.message}"
end
end
def parse_token(token)
begin
decoded_token = verifier.verify(token)
ActiveSupport::JSON.decode(decoded_token)
rescue ActiveSupport::MessageVerifier::InvalidSignature => ex
- Rails.logger.error "invalid session token: #{token}"
+ Log.error "invalid session token: #{token}"
Hash.new
end
end
def session_key
\ No newline at end of file