No description, website, or topics provided.
Latest commit fd61b2e Mar 9, 2012 aereal Merge pull request #2 from spagalloco/patch-1
added jruby-openssl for JRuby compatability

Dependency Status

Build Status

OmniAuth XAuth

OmniAuth XAuth strategy for use in OmniAuth 1.0 strategy development.

This gem contains a generic XAuth strategy for OmniAuth. It is meant to serve as a building block strategy for other strategies and not to be used independently (since it has no inherent way to gather uid and user info).

The XAuth form is rendered as an OmniAuth Form and can be styled as such.

Creating an XAuth Strategy

To create an OmniAuth XAuth strategy using this gem, you can simply subclass it and add a few extra methods like so:

require 'omniauth-xauth'

module OmniAuth
  module Strategies
    class SomeSite < OmniAuth::Strategies::XAuth
      option :client_options, {
        :site               => '',
        :access_token_url   => ''
      option :xauth_options, { :title => 'XAuth Login Form Header'}

      # This is where you pass the options you would pass when
      # initializing your consumer from the OAuth gem.

      uid { raw_info['uid'] }
      info do
          :name => raw_info['name'],
          :email => raw_info['email']

      extra do
          'raw_info' => raw_info

      def raw_info
        @raw_info ||= MultiJson.decode(access_token.get('/me.json').body)