Object
Building Web Service Security.
PasswordDigest URI.
PasswordText URI.
Namespace for WS Security Secext.
Namespace for WS Security Utility.
Returns a value from the WSSE Hash.
# File lib/akami/wsse.rb, line 26 def [](key) hash[key] end
Sets a value on the WSSE Hash.
# File lib/akami/wsse.rb, line 31 def []=(key, value) hash[key] = value end
Sets authentication credentials for a wsse:UsernameToken header. Also accepts whether to use WSSE digest authentication.
# File lib/akami/wsse.rb, line 37 def credentials(username, password, digest = false) self.username = username self.password = password self.digest = digest end
Returns whether to use WSSE digest. Defaults to false.
# File lib/akami/wsse.rb, line 46 def digest? !!@digest end
Sets whether to generate a wsu:Timestamp header.
# File lib/akami/wsse.rb, line 63 def timestamp=(timestamp) @wsu_timestamp = timestamp end
Returns whether to generate a wsu:Timestamp header.
# File lib/akami/wsse.rb, line 58 def timestamp? created_at || expires_at || @wsu_timestamp end
Returns the XML for a WSSE header.
# File lib/akami/wsse.rb, line 68 def to_xml if username_token? && timestamp? Gyoku.xml wsse_username_token.merge!(wsu_timestamp) { |key, v1, v2| v1.merge!(v2) { |key, v1, v2| v1.merge!(v2) } } elsif username_token? Gyoku.xml wsse_username_token.merge!(hash) elsif timestamp? Gyoku.xml wsu_timestamp.merge!(hash) else "" end end
Generated with the Darkfish Rdoc Generator 2.