Class: OpenID::Server::PlainTextServerSession

Inherits:
BaseServerSession show all
Defined in:
lib/openid/server.rb

Overview

An object that knows how to handle association requests with no session type.

See OpenID Specs, Section 8: Establishing Associations <openid.net/specs/openid-authentication-2_0-12.html#associations>

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseServerSession

#allowed_assoc_type?

Constructor Details

#initializePlainTextServerSession



181
182
183
# File 'lib/openid/server.rb', line 181

def initialize
  super("no-encryption", %w[HMAC-SHA1 HMAC-SHA256])
end

Instance Attribute Details

#session_typeObject (readonly)

The session_type for this association session. There is no type defined for plain-text in the OpenID specification, so we use ‘no-encryption’.



179
180
181
# File 'lib/openid/server.rb', line 179

def session_type
  @session_type
end

Class Method Details

.from_message(_unused_request) ⇒ Object



185
186
187
# File 'lib/openid/server.rb', line 185

def self.from_message(_unused_request)
  new
end

Instance Method Details

#answer(secret) ⇒ Object



189
190
191
# File 'lib/openid/server.rb', line 189

def answer(secret)
  {"mac_key" => Util.to_base64(secret)}
end