Method: X::OAuthAuthenticator#header

Defined in:
lib/x/oauth_authenticator.rb

#header(request) ⇒ Hash{String => String}

Generate the OAuth authentication header for a request

Examples:

Generate an OAuth authentication header

authenticator.header(request)

Parameters:

  • request (Net::HTTPRequest)

    the HTTP request

Returns:

  • (Hash{String => String})

    the authentication header with OAuth signature



77
78
79
80
# File 'lib/x/oauth_authenticator.rb', line 77

def header(request)
  method, url, query_params = parse_request(request)
  {AUTHENTICATION_HEADER => build_oauth_header(method, url, query_params)}
end