Class: URI::Generic

Inherits:
Object
  • Object
show all
Defined in:
lib/url_signer/uri.rb

Instance Method Summary collapse

Instance Method Details

#signature_valid?(*options) ⇒ Boolean

Checks the validity of the current URI signature.

signed_url = URI.parse('http://google.fr').signed
signed_url.signature_valid? # => true

for options see UrlSigner#verify.

Returns:

  • (Boolean)


23
24
25
# File 'lib/url_signer/uri.rb', line 23

def signature_valid?(*options)
  UrlSigner.valid?(self, *options)
end

#signed(*options) ⇒ Object

Return a signed version of the URI.

url = URI.parse('http://google.fr')
signed_url = url.signed

for options see UrlSigner#sign.



13
14
15
# File 'lib/url_signer/uri.rb', line 13

def signed(*options)
  UrlSigner.sign(self, *options)
end