class Net::HTTP::Signature
Constants
- HEADER
- VERSION
Public Class Methods
new(key:, signer:)
click to toggle source
# File lib/net/http/signature.rb, line 14 def initialize(key:, signer:) @key = key @signer = signer end
Public Instance Methods
to_h()
click to toggle source
# File lib/net/http/signature.rb, line 27 def to_h { HEADER => to_s } end
to_s()
click to toggle source
# File lib/net/http/signature.rb, line 23 def to_s "key=#{key} algorithm=#{algorithm} token=#{signer}" end
valid?(string)
click to toggle source
# File lib/net/http/signature.rb, line 19 def valid?(string) to_s.strip == string.strip end
Private Instance Methods
algorithm()
click to toggle source
# File lib/net/http/signature.rb, line 37 def algorithm @signer.algorithm end
key()
click to toggle source
# File lib/net/http/signature.rb, line 33 def key @key end
signer()
click to toggle source
# File lib/net/http/signature.rb, line 41 def signer @signer end