gitlab-org--gitlab-foss/lib/gitlab/o_auth/session.rb
Robert Speicher d0622b79d8 Better categorize test coverage results
Also marks a few things as uncovered, and removes an unused class.
2017-08-11 10:59:11 -04:00

19 lines
488 B
Ruby

# :nocov:
module Gitlab
module OAuth
module Session
def self.create(provider, ticket)
Rails.cache.write("gitlab:#{provider}:#{ticket}", ticket, expires_in: Gitlab.config.omniauth.cas3.session_duration)
end
def self.destroy(provider, ticket)
Rails.cache.delete("gitlab:#{provider}:#{ticket}")
end
def self.valid?(provider, ticket)
Rails.cache.read("gitlab:#{provider}:#{ticket}").present?
end
end
end
end
# :nocov: