Sha256: 889a072e6630cdf08b0d3c6e24a5a665204a827e2323744bd590704fc9d728db

Contents?: true

Size: 835 Bytes

Versions: 5

Compression:

Stored size: 835 Bytes

Contents

# Dummy implementation
class ClientApplication
  attr_accessor :key

  def self.find_by_key(key)
    ClientApplication.new(key)
  end

  def initialize(key)
    @key = key
  end

  def tokens
    @tokens||=[]
  end

  def secret
    "secret"
  end
end

class OauthToken
  attr_accessor :token

  def self.first(conditions_hash)
    case conditions_hash[:conditions].last
    when "not_authorized", "invalidated"
      nil
    else
      OauthToken.new(conditions_hash[:conditions].last)
    end
  end

  def initialize(token)
    @token = token
  end

  def secret
    "secret"
  end
end

class Oauth2Token < OauthToken ; end
class Oauth2Verifier < OauthToken ; end
class AccessToken < OauthToken ; end
class RequestToken < OauthToken ; end

class OauthNonce
  # Always remember
  def self.remember(nonce,timestamp)
    true
  end
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
panjiva-oauth-plugin-0.4.1 spec/dummy_provider_models.rb
oauth-provider-0.5.0rc1 spec/dummy_provider_models.rb
oauth-plugin-0.4.1 spec/dummy_provider_models.rb
oauth-plugin-0.4.0 spec/dummy_provider_models.rb
oauth-plugin-0.4.0.rc2 spec/dummy_provider_models.rb