Class: OAuth::RequestProxy::JabberRequest — Documentation by YARD 0.9.44

# Class: OAuth::RequestProxy::JabberRequest

Inherits:
  Base
  - Object
  - Base
  - OAuth::RequestProxy::JabberRequest
  show all

Defined in:
  lib/oauth/request_proxy/jabber_request.rb

## Instance Attribute Summary

### Attributes inherited from Base

#options, #request, #unsigned_parameters

## Instance Method Summary collapse

- #method ⇒ Object
- #normalized_uri ⇒ Object
- #parameters ⇒ Object
- #uri ⇒ Object

### Methods inherited from Base

#initialize, #non_oauth_parameters, #normalized_parameters, #oauth_callback, #oauth_consumer_key, #oauth_header, #oauth_nonce, #oauth_parameters, #oauth_signature, #oauth_signature_method, #oauth_timestamp, #oauth_token, #oauth_verifier, #oauth_version, #parameters_for_signature, proxies, #query_string_blank?, #sign, #sign!, #signature_and_unsigned_parameters, #signature_base_string, #signed?, #signed_uri

### Methods included from Helper

_escape, escape, generate_key, generate_timestamp, normalize, normalize_nested_query, parse_header, stringify_keys, unescape

## Constructor Details

This class inherits a constructor from OAuth::RequestProxy::Base

## Instance Method Details

### #method ⇒ `Object`

    38
    39
    40
    # File 'lib/oauth/request_proxy/jabber_request.rb', line 38

    def method
      @request.name
    end

### #normalized_uri ⇒ `Object`

    46
    47
    48
    # File 'lib/oauth/request_proxy/jabber_request.rb', line 46

    def normalized_uri
      uri
    end

### #parameters ⇒ `Object`

    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    # File 'lib/oauth/request_proxy/jabber_request.rb', line 13

    def parameters
      return @params if @params

      @params = {}

      oauth = @request.get_elements("//oauth").first
      return @params unless oauth

      %w[
        oauth_token
        oauth_consumer_key
        oauth_signature_method
        oauth_signature
        oauth_timestamp
        oauth_nonce
        oauth_version
      ].each do |param|
        next unless (element = oauth.first_element(param))

        @params[param] = element.text
      end

      @params
    end

### #uri ⇒ `Object`

    42
    43
    44
    # File 'lib/oauth/request_proxy/jabber_request.rb', line 42

    def uri
      [@request.from.strip.to_s, @request.to.strip.to_s].join("&")
    end