class OAuth::Token

Superclass for the various tokens used by OAuth.

Includes {OAuth::AUTH_SANITIZER::FilteredAttributes} so inspect output redacts the token value and token secret while leaving object identity and non-sensitive fields visible.

Attributes

secret[RW]

Token attributes.

@!attribute [rw] token

@return [String] OAuth token value (redacted in `#inspect`)

@!attribute [rw] secret

@return [String] OAuth token secret (redacted in `#inspect`)
token[RW]

Token attributes.

@!attribute [rw] token

@return [String] OAuth token value (redacted in `#inspect`)

@!attribute [rw] secret

@return [String] OAuth token secret (redacted in `#inspect`)

Public Class Methods

new(token, secret) click to toggle source
   # File lib/oauth/tokens/token.rb
22 def initialize(token, secret)
23   @token = token
24   @secret = secret
25 end

Public Instance Methods

to_query() click to toggle source
   # File lib/oauth/tokens/token.rb
27 def to_query
28   "oauth_token=#{escape(token)}&oauth_token_secret=#{escape(secret)}"
29 end