Class: Cassiopeia::Server

Inherits:
Base
  • Object
show all
Defined in:
lib/cassiopeia/server.rb

Constant Summary collapse

SERVICE_KEY =
Cassiopeia::CONFIG[:service_url_key]
TICKET_KEY =
Cassiopeia::CONFIG[:ticket_id_key]
REQ_KEY =
Cassiopeia::CONFIG[:rack_unique_req_key]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.instanceObject



15
16
17
18
# File 'lib/cassiopeia/server.rb', line 15

def self.instance
  return @instance if @instance
  @instance = Cassiopeia::Server.new
end

Instance Method Details

#service_url(session, params) ⇒ Object



20
21
22
23
24
# File 'lib/cassiopeia/server.rb', line 20

def service_url(session, params)
  if session && session[SERVICE_KEY] && session[TICKET_KEY]
    session[SERVICE_KEY] + "?" + hash_to_query(cas_data(session, params))
  end
end