Sha256: 6e2b25dd9b091d5fa8eff5137400e99bdc311121ea324857b64892fe225e9d87

Contents?: true

Size: 499 Bytes

Versions: 1

Compression:

Stored size: 499 Bytes

Contents

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
$LOAD_PATH.unshift 'lib', '../lib'
require 'rlyeh'

class OAuthServer < Rlyeh::Base
  use Rlyeh::DeepOnes::Logger
  use Rlyeh::DeepOnes::Auth::OAuth, 'consumer key', 'consumer secret', {
    :authorize_path => '/oauth/authenticate',
    :site => 'https://api.twitter.com'
  }

  set :server_name, 'oauth-server'
  set :server_version, '1.0.0'

  on :privmsg do |env|
    puts "RECV: #{env.message}"
  end
end

Rlyeh.emerge OAuthServer, :host => '0.0.0.0'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rlyeh-0.1.1 examples/oauth.rb