Class: OAuth::Server

### Home Classes Methods

### In Files

- lib/oauth/server.rb

### Parent

Object

### Methods

- ::new
- #access_token_path
- #access_token_url
- #authorize_path
- #authorize_url
- #create_consumer
- #generate_consumer_credentials
- #generate_credentials
- #request_token_path
- #request_token_url

### Included Modules

- OAuth::Helper

### Files

- LICENSE
- README.rdoc
- TODO

### Class/Module Index

Quicksearch

- OAuth
- OAuth::AccessToken
- OAuth::CLI
- OAuth::Client
- OAuth::Client::Helper
- OAuth::Consumer
- OAuth::ConsumerToken
- OAuth::Error
- OAuth::Helper
- OAuth::OAuthTestHelper
- OAuth::Problem
- OAuth::RequestProxy
- OAuth::RequestProxy::ActionControllerRequest
- OAuth::RequestProxy::Base
- OAuth::RequestProxy::Curl
- OAuth::RequestProxy::Curl::Easy
- OAuth::RequestProxy::EventMachine
- OAuth::RequestProxy::EventMachine::HttpRequest
- OAuth::RequestProxy::JabberRequest
- OAuth::RequestProxy::MockRequest
- OAuth::RequestProxy::Net
- OAuth::RequestProxy::Net::HTTP
- OAuth::RequestProxy::Net::HTTP::HTTPRequest
- OAuth::RequestProxy::RackRequest
- OAuth::RequestProxy::Typhoeus
- OAuth::RequestProxy::Typhoeus::Request
- OAuth::RequestProxy::UnknownRequestType
- OAuth::RequestToken
- OAuth::Server
- OAuth::ServerToken
- OAuth::Signature
- OAuth::Signature::Base
- OAuth::Signature::HMAC
- OAuth::Signature::HMAC::Base
- OAuth::Signature::HMAC::MD5
- OAuth::Signature::HMAC::RMD160
- OAuth::Signature::HMAC::SHA1
- OAuth::Signature::HMAC::SHA2
- OAuth::Signature::MD5
- OAuth::Signature::PLAINTEXT
- OAuth::Signature::RSA
- OAuth::Signature::RSA::SHA1
- OAuth::Signature::SHA1
- OAuth::Signature::UnknownSignatureMethod
- OAuth::Token
- OAuth::Unauthorized
- ActionController
- ActionController::Base
- ActionController::TestRequest
- Digest
- Digest::HMAC
- EventMachine
- EventMachine::HttpClient
- Net
- Net::HTTPGenericRequest
- Object
- String

No matching classes.

# OAuth::Server

This is mainly used to create consumer credentials and can pretty much be ignored if you want to create your own

### Attributes

base_url[RW]

### Public Class Methods

new(base_url, paths = {}) click to toggle source

Create a new server instance

    # File lib/oauth/server.rb, line 17
    def initialize(base_url, paths = {})
      @base_url = base_url
      @paths = @@server_paths.merge(paths)
    end

### Public Instance Methods

access_token_path() click to toggle source

    # File lib/oauth/server.rb, line 58
    def access_token_path
      @paths[:access_token_path]
    end

access_token_url() click to toggle source

    # File lib/oauth/server.rb, line 62
    def access_token_url
      base_url + access_token_path
    end

authorize_path() click to toggle source

    # File lib/oauth/server.rb, line 50
    def authorize_path
      @paths[:authorize_path]
    end

authorize_url() click to toggle source

    # File lib/oauth/server.rb, line 54
    def authorize_url
      base_url + authorize_path
    end

create_consumer() click to toggle source

mainly for testing purposes

    # File lib/oauth/server.rb, line 31
    def create_consumer
      creds = generate_credentials
      Consumer.new(creds[0], creds[1],
        {
          :site               => base_url,
          :request_token_path => request_token_path,
          :authorize_path     => authorize_path,
          :access_token_path  => access_token_path
        })
    end

generate_consumer_credentials(params = {}) click to toggle source

    # File lib/oauth/server.rb, line 26
    def generate_consumer_credentials(params = {})
      Consumer.new(*generate_credentials)
    end

generate_credentials() click to toggle source

    # File lib/oauth/server.rb, line 22
    def generate_credentials
      [generate_key(16), generate_key]
    end

request_token_path() click to toggle source

    # File lib/oauth/server.rb, line 42
    def request_token_path
      @paths[:request_token_path]
    end

request_token_url() click to toggle source

    # File lib/oauth/server.rb, line 46
    def request_token_url
      base_url + request_token_path
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.