Class: Katello::UrlConstrainedCookieStore
- Inherits:
-
ActionDispatch::Session::CookieStore
- Object
- ActionDispatch::Session::CookieStore
- Katello::UrlConstrainedCookieStore
- Defined in:
- lib/katello/url_constrained_cookie_store.rb
Instance Method Summary collapse
Methods included from UrlConstrainedCookieStoreV32X
Methods included from UrlConstrainedCookieStoreV30X
Instance Method Details
#create_cookie(request, cookie_data, options) ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/katello/url_constrained_cookie_store.rb', line 69 def (request, , ) = {} [:value] = if [:expire_after] [:value]['created_at'] ||= Time.now if expiration_exceptions().any? { |e| request.fullpath.include?(e) } [:expires] = [:value]['created_at'] + [:expire_after] else [:value]['created_at'] = Time.now [:expires] = [:value]['created_at'] + [:expire_after] end end end |
#expiration_exceptions(options) ⇒ Object
64 65 66 67 |
# File 'lib/katello/url_constrained_cookie_store.rb', line 64 def expiration_exceptions() exceptions = [:expiration_exceptions] || [] exceptions.instance_of?(Array) ? exceptions : [exceptions] end |