gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/cookie_signer.rb
def signed_cookie(url, params = {})
        scheme, uri = scheme_and_uri(url)
        signed_content = signature(
          resource: resource(scheme, uri),
          expires: time(params[:expires]),
          policy: params[:policy]
        )

        cookie_parameters = {}
        signed_content.each { |k, v|
          cookie_parameters["CloudFront-#{k}"] = v.to_s.gsub("\n", '')
        }
        cookie_parameters
      end
# create a set of signed Amazon CloudFront cookie parameters
# @param [String] url
# @option params [Time, DateTime, Date, String, Integer<timestamp>] :expires
# @option params [String<JSON>] :policy
create a set of signed Amazon CloudFront cookie parameters
create a set of signed Amazon CloudFront cookie parameters
def signed_cookie(url, params = {})
        scheme, uri = scheme_and_uri(url)
        signed_content = signature(
          resource: resource(scheme, uri),
          expires: time(params[:expires]),
          policy: params[:policy]
        )
        cookie_parameters = {}
        signed_content.each { |k, v|
          cookie_parameters["CloudFront-#{k}"] = v.to_s.gsub("\n", '')
        }
        cookie_parameters
      end
def signed_cookie ( url , params = { } ) scheme , uri = scheme_and_uri ( url ) signed_content = signature ( resource : resource ( scheme , uri ) , expires : time ( params [ :expires ] ) , policy : params [ :policy ] ) cookie_parameters = { } signed_content . each { | k , v | cookie_parameters [ "CloudFront-#{k}" ] = v . to_s . gsub ( "\n" , '' ) } cookie_parameters end
create a set of signed Amazon CloudFront cookie parameters
create a set of signed Amazon CloudFront cookie parameters
url
params
None
None