Module: Codeword::Authentication
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/codeword/authentication.rb
Instance Method Summary collapse
- #require_codeword! ⇒ Object (also: #check_for_codeword)
Instance Method Details
#require_codeword! ⇒ Object Also known as: check_for_codeword
5 6 7 8 9 10 11 12 13 |
# File 'lib/codeword/authentication.rb', line 5 def require_codeword! return unless respond_to?(:codeword) && Codeword::Configuration.codeword_code return if [:codeword].present? && [:codeword] == Codeword::Configuration.codeword_code.to_s.downcase redirect_to codeword.unlock_path( return_to: request.fullpath.split('?codeword')[0], codeword: params[:codeword] ) end |