oa-cadun 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ .DS_Store
4
+ Gemfile.lock
5
+ pkg/*
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --colour
2
+ --format documentation
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+ - ree
5
+ - jruby
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # CadUn OmniAuth
2
+
3
+ CadUn is an authentication service provided by Globo.com. Currently it's only available for internal services. It will be public very soon.
4
+
5
+ The goal of this gem is to create a bridge between Cadun and your app through OmniAuth.
6
+
7
+ ## Installation
8
+
9
+ Add into your Gemfile
10
+
11
+ gem "oa-cadun"
12
+
13
+ Then configure the middleware with the CadUn's service id
14
+
15
+ config.middleware.use OmniAuth::Strategies::Cadun, :service_id => 1234
16
+
17
+ After that, you just need to follow the OmniAuth standard configuration creating a callback controller to handle the CadUn's redirect. Something like this:
18
+
19
+ class SessionsController < ActionController::Base
20
+ def new
21
+ redirect_to logged_in? ? dashboard_url : '/auth/cadun'
22
+ end
23
+
24
+ def create
25
+ auth = request.env['omniauth.auth']
26
+
27
+ if auth and auth['id']
28
+ user = User.find_by_id(auth['id'])
29
+ user = User.create_from_omniauth(auth) unless user
30
+
31
+ session[:user_id] = user.id
32
+ redirect_to root_url
33
+ else
34
+ redirect_to '/auth/cadun'
35
+ end
36
+ end
37
+
38
+ def destroy
39
+ session.delete(:user_id)
40
+ cookies.delete("GLBID")
41
+ redirect_to root_url
42
+ end
43
+ end
44
+
45
+ That way the controller will check if OmniAuth has returned the CadUn's data, if so it will find or create an user, if not it will redirect the user back to the CadUn authentication screen.
46
+
47
+ And set your routes:
48
+
49
+ match "/auth/cadun" => "sessions#new"
50
+ match "/auth/cadun/callback" => "sessions#create"
51
+ match "/auth/cadun/logout" => "sessions#destroy"
52
+
53
+
54
+ ## Dynamic Service Ids
55
+
56
+ Let's say your application works with many service ids. You can work with a "SETUP" step.
57
+
58
+ Add to the configuration:
59
+
60
+ config.middleware.use OmniAuth::Strategies::Cadun, :service_id => 1234, :setup => true
61
+
62
+ Then add to your callback controller:
63
+
64
+ def setup
65
+ request.env['omniauth.strategy'].options[:service_id] = object.service_id
66
+ render :nothing => true, :status => 404
67
+ end
68
+
69
+ It's really important to finish the action with a 404 status. It says to OmniAuth that it can go ahead and complete the flow.
70
+
71
+ The setup step can change the options of the Strategy, so you can change the service id and the redirect will go to any service you set.
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ require 'bundler'
2
+ require 'rspec/core/rake_task'
3
+ Bundler::GemHelper.install_tasks
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => 'spec'
@@ -0,0 +1,32 @@
1
+ module OACadun
2
+ class Gateway
3
+ def initialize(glb_id, ip, service_id)
4
+ @glb_id, @ip, @service_id = glb_id, ip, service_id
5
+ end
6
+
7
+ def content
8
+ @content ||= Nokogiri::XML(resource).children
9
+ end
10
+
11
+ def authorization
12
+ @authorization ||= Nokogiri::XML(connection.put("/ws/rest/autorizacao", "<usuarioAutorizado><glbId>#{@glb_id}</glbId><ip>#{@ip}</ip><servicoID>#{@service_id}</servicoID></usuarioAutorizado>", {'Content-Type' => 'text/xml'}).body).children
13
+ end
14
+
15
+ def resource
16
+ @resource ||= connection.get("/cadunii/ws/resources/pessoa/#{authorization.xpath("usuarioID").text}", {'Content-Type' => 'text/xml'}).body
17
+ end
18
+
19
+ def connection
20
+ @connection ||= Net::HTTP.new(*(development? ? ["isp-authenticator.dev.globoi.com", 8280] : ["autenticacao.globo.com", 8080] ))
21
+ end
22
+
23
+ protected
24
+ def development?
25
+ if defined?(Rails)
26
+ Rails.env.development?
27
+ else
28
+ true
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,40 @@
1
+ module OACadun
2
+ class User
3
+ attr_reader :gateway
4
+
5
+ { "id" => "id",
6
+ "nome" => "name",
7
+ "emailPrincipal" => "email",
8
+ "sexo" => "gender",
9
+ "bairro" => "suburb",
10
+ "cidade/nome" => "city",
11
+ "estado/sigla" => "state",
12
+ "pais/nome" => "country" }.each do |path, method|
13
+ define_method(method) { gateway.content.xpath(path).text }
14
+ end
15
+
16
+ def initialize(glb_id, ip, service_id)
17
+ @gateway = Gateway.new(@glb_id, @ip, @service_id)
18
+ end
19
+
20
+ def address
21
+ "#{endereco}, #{numero}"
22
+ end
23
+
24
+ def birthday
25
+ Date.parse(dataNascimento)
26
+ end
27
+
28
+ def phone
29
+ "#{telefoneResidencialDdd} #{telefoneResidencial}"
30
+ end
31
+
32
+ def mobile
33
+ "#{telefoneCelularDdd} #{telefoneCelular}"
34
+ end
35
+
36
+ def method_missing(method)
37
+ gateway.content.xpath(method.to_s).text
38
+ end
39
+ end
40
+ end
data/lib/oa-cadun.rb ADDED
@@ -0,0 +1,11 @@
1
+ $:.push File.expand_path("lib", __FILE__)
2
+
3
+ require 'uri'
4
+ require 'cgi'
5
+ require 'net/http'
6
+ require 'oa-core'
7
+ require 'nokogiri'
8
+ require 'date'
9
+ require 'oa-cadun/gateway'
10
+ require 'oa-cadun/user'
11
+ require 'omni_auth/strategies/cadun'
@@ -0,0 +1,50 @@
1
+ module OmniAuth
2
+ module Strategies
3
+ class Cadun
4
+ include OmniAuth::Strategy
5
+
6
+ attr_reader :glb_id, :url, :params
7
+
8
+ def initialize(app, options = {})
9
+ super(app, :cadun, options)
10
+ end
11
+
12
+ def request_phase
13
+ redirect "https://login.dev.globoi.com/login/#{service_id}"
14
+ end
15
+
16
+ def auth_hash
17
+ @params = CGI.parse(URI.parse(env["REQUEST_URI"]).query)
18
+ @glb_id = params["GLBID"].first
19
+ @url = params["url"].first
20
+
21
+ { :GLBID => glb_id,
22
+ :url => url,
23
+ :id => user.id,
24
+ :email => user.email,
25
+ :status => user.status,
26
+ :username => user.login,
27
+ :name => user.name,
28
+ :address => user.address,
29
+ :suburb => user.suburb,
30
+ :city => user.city,
31
+ :state => user.state,
32
+ :country => user.country,
33
+ :gender => user.gender,
34
+ :birthday => user.birthday.strftime('%d/%m/%Y'),
35
+ :mobile => user.mobile,
36
+ :phone => user.phone,
37
+ :cpf => user.cpf }
38
+ end
39
+
40
+ protected
41
+ def user
42
+ @user ||= OACadun::User.new(glb_id, env["REMOTE_ADDR"], service_id)
43
+ end
44
+
45
+ def service_id
46
+ @options[:service_id]
47
+ end
48
+ end
49
+ end
50
+ end
data/lib/version.rb ADDED
@@ -0,0 +1,3 @@
1
+ module OACadun
2
+ VERSION = "0.1.1"
3
+ end
data/oa-cadun.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "oa-cadun"
7
+ s.version = OACadun::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Bruno Azisaka Maciel"]
10
+ s.email = ["bruno@azisaka.com.br"]
11
+ s.homepage = ""
12
+ s.summary = %q{OmniAuth strategy for CadUn}
13
+ s.description = %q{The goal of this gem is to allow the developer to use CadUn (a login webservice made by Globo.com) in any web app using OmniAuth}
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_dependency 'oa-core'
21
+ s.add_dependency 'nokogiri'
22
+ s.add_development_dependency 'rack'
23
+ s.add_development_dependency 'rspec'
24
+ s.add_development_dependency 'rr'
25
+ s.add_development_dependency 'fakeweb'
26
+ end
@@ -0,0 +1,67 @@
1
+ require 'spec_helper'
2
+
3
+ describe OACadun::Gateway do
4
+ subject { OACadun::Gateway.new("GLB_ID", "127.0.0.1", 2626) }
5
+
6
+ describe "#content" do
7
+ it "should parse the resource" do
8
+ connection = mock
9
+ response = mock
10
+ body = "<?xml version='1.0' encoding='utf-8'?><pessoa><nome>Barack Obama</nome></pessoa>"
11
+ mock(response).body { body }
12
+
13
+ mock(subject).authorization { Nokogiri::XML("<?xml version='1.0' encoding='utf-8'?><pessoa><usuarioID>1</usuarioID></pessoa>").children }
14
+ mock(connection).get("/cadunii/ws/resources/pessoa/1", {'Content-Type' => 'text/xml'}) { response }
15
+ mock(subject).connection { connection }
16
+
17
+ subject.content.xpath('nome').text.should == 'Barack Obama'
18
+ end
19
+ end
20
+
21
+ describe "#connection" do
22
+ context "when the environment is development" do
23
+ before { mock(subject).development? { true } }
24
+
25
+ it "should request from the development server" do
26
+ mock(Net::HTTP).new("isp-authenticator.dev.globoi.com", 8280)
27
+ subject.connection
28
+ end
29
+ end
30
+
31
+ context "when the environment is not development" do
32
+ before { mock(subject).development? { false } }
33
+
34
+ it "should request from the production server" do
35
+ mock(Net::HTTP).new("autenticacao.globo.com", 8080)
36
+ subject.connection
37
+ end
38
+ end
39
+ end
40
+
41
+ describe "#authorization" do
42
+ it "should parse the authorization request" do
43
+ connection = mock
44
+ response = mock
45
+ mock(response).body { "<?xml version='1.0' encoding='utf-8'?><pessoa><usuarioID>1</id></usuarioID>" }
46
+ mock(connection).put("/ws/rest/autorizacao", "<usuarioAutorizado><glbId>GLB_ID</glbId><ip>127.0.0.1</ip><servicoID>2626</servicoID></usuarioAutorizado>", {'Content-Type' => 'text/xml'}) { response }
47
+ mock(subject).connection { connection }
48
+
49
+ subject.authorization.xpath('usuarioID').text.should == '1'
50
+ end
51
+ end
52
+
53
+ describe "#resource" do
54
+ it "should parse the resource request" do
55
+ connection = mock
56
+ response = mock
57
+ body = "<?xml version='1.0' encoding='utf-8'?><pessoa><nome>Barack Obama</nome></pessoa>"
58
+ mock(response).body { body }
59
+
60
+ mock(subject).authorization { Nokogiri::XML("<?xml version='1.0' encoding='utf-8'?><pessoa><usuarioID>1</usuarioID></pessoa>").children }
61
+ mock(connection).get("/cadunii/ws/resources/pessoa/1", {'Content-Type' => 'text/xml'}) { response }
62
+ mock(subject).connection { connection }
63
+
64
+ subject.resource.should == body
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,68 @@
1
+ require 'spec_helper'
2
+
3
+ describe OACadun::User do
4
+
5
+ before { stub_requests }
6
+
7
+ subject { OACadun::User.new("GLB_ID", "127.0.0.1", 2626) }
8
+
9
+ describe "#id" do
10
+ it { subject.id.should == "21737810" }
11
+ end
12
+
13
+ describe "#name" do
14
+ it { subject.name.should == "Fabricio Rodrigo Lopes" }
15
+ end
16
+
17
+ describe "#birthday" do
18
+ it { subject.birthday.should == Date.new(1983, 02, 22) }
19
+ end
20
+
21
+ describe "#phone" do
22
+ it { subject.phone.should == "21 22881060" }
23
+ end
24
+
25
+ describe "#mobile" do
26
+ it { subject.mobile.should == "21 99999999" }
27
+ end
28
+
29
+ describe "#email" do
30
+ it { subject.email.should == "fab1@spam.la"}
31
+ end
32
+
33
+ describe "#gender" do
34
+ it { subject.gender.should == "MASCULINO" }
35
+ end
36
+
37
+ describe "#city" do
38
+ it { subject.city.should == "Rio de Janeiro"}
39
+ end
40
+
41
+ describe "#state" do
42
+ it { subject.state.should == "RJ" }
43
+ end
44
+
45
+ describe "#status" do
46
+ it { subject.status.should == "ATIVO" }
47
+ end
48
+
49
+ describe "#address" do
50
+ it { subject.address.should == "Rua Uruguai, 59"}
51
+ end
52
+
53
+ describe "#suburb" do
54
+ it { subject.suburb.should == "Andaraí" }
55
+ end
56
+
57
+ describe "#cpf" do
58
+ it { subject.cpf.should == "09532034765" }
59
+ end
60
+
61
+ describe "#login" do
62
+ it { subject.login.should == "fabricio_fab1" }
63
+ end
64
+
65
+ describe "#country" do
66
+ it { subject.country.should == "Brasil" }
67
+ end
68
+ end
@@ -0,0 +1,59 @@
1
+ require 'spec_helper'
2
+
3
+ describe OmniAuth::Strategies::Cadun do
4
+
5
+ let(:app) { lambda{ |env| [200, {}, ['Hello']] } }
6
+
7
+ describe "#request_phase" do
8
+
9
+ before do
10
+ @status, @headers, @body = OmniAuth::Strategies::Cadun.new(app, :service_id => 1).request_phase
11
+ end
12
+
13
+ describe "status" do
14
+ subject { @status }
15
+ specify { should == 302 }
16
+ end
17
+
18
+ describe "headers" do
19
+ subject { @headers }
20
+ specify { should include("Location" => "https://login.dev.globoi.com/login/1") }
21
+ end
22
+
23
+ end
24
+
25
+ describe "#auth_hash" do
26
+
27
+ let(:strategy) { OmniAuth::Strategies::Cadun.new(app, :service_id => 1) }
28
+
29
+ before do
30
+ stub_requests
31
+
32
+ strategy.call!({ "rack.session" => {},
33
+ "REQUEST_URI" => "http://localhost?GLBID=GLBID&url=/go_back",
34
+ "REMOTE_ADDR" => "127.0.0.1" })
35
+ end
36
+
37
+ subject { strategy.auth_hash }
38
+
39
+ specify { should include(:GLBID => "GLBID") }
40
+ specify { should include(:id => "21737810") }
41
+ specify { should include(:email => "fab1@spam.la") }
42
+ specify { should include(:status => "ATIVO") }
43
+ specify { should include(:username => "fabricio_fab1") }
44
+ specify { should include(:name => "Fabricio Rodrigo Lopes") }
45
+ specify { should include(:address => "Rua Uruguai, 59") }
46
+ specify { should include(:suburb => "Andaraí") }
47
+ specify { should include(:city => "Rio de Janeiro") }
48
+ specify { should include(:state => "RJ") }
49
+ specify { should include(:country => "Brasil") }
50
+ specify { should include(:gender => "MASCULINO") }
51
+ specify { should include(:birthday => "22/02/1983") }
52
+ specify { should include(:mobile => "21 99999999") }
53
+ specify { should include(:phone => "21 22881060") }
54
+ specify { should include(:cpf => "09532034765") }
55
+ specify { should include(:url => "/go_back") }
56
+
57
+ end
58
+
59
+ end
@@ -0,0 +1,26 @@
1
+ require "#{File.dirname(__FILE__)}/../lib/oa-cadun"
2
+ require 'fakeweb'
3
+
4
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
5
+
6
+ RSpec.configure do |config|
7
+ config.before :suite do
8
+ FakeWeb.allow_net_connect = false
9
+ end
10
+
11
+ config.before :each do
12
+ FakeWeb.clean_registry
13
+ end
14
+
15
+ config.mock_with :rr
16
+ config.filter_run :focus => true
17
+ config.run_all_when_everything_filtered = true
18
+ end
19
+
20
+ def stub_requests
21
+ FakeWeb.register_uri :put, "http://isp-authenticator.dev.globoi.com:8280/ws/rest/autorizacao",
22
+ :body => File.join(File.dirname(__FILE__), "support", "fixtures", "autorizacao.xml")
23
+
24
+ FakeWeb.register_uri :get, "http://isp-authenticator.dev.globoi.com:8280/cadunii/ws/resources/pessoa/21737810",
25
+ :body => File.join(File.dirname(__FILE__), "support", "fixtures", "pessoa.xml")
26
+ end
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <usuarioAutorizado>
3
+ <emailPrincipal>fab1@spam.la</emailPrincipal>
4
+ <glbId>1484e00106ea401d57902541631200e8a6d44556132366c754c4261655666625537614531655252536e6262626c63676676436c6c316744544d5636617651707a6d417a49756b6e3830415a4a394f36773a303a66616231407370616d2e6c61</glbId>
5
+ <ip>10.2.25.160</ip>
6
+ <login>fab1@spam.la</login>
7
+ <servicoID>2626</servicoID>
8
+ <status>AUTORIZADO</status>
9
+ <statusUsuario>ATIVO</statusUsuario>
10
+ <tipoUsuario>NAO_ASSINANTE</tipoUsuario>
11
+ <username>fabricio_fab1</username>
12
+ <usuarioID>21737810</usuarioID>
13
+ </usuarioAutorizado>
@@ -0,0 +1,77 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <pessoa>
3
+ <id>21737810</id>
4
+ <alteracao>2011-04-25T00:00:00-03:00</alteracao>
5
+ <bairro>Andaraí</bairro>
6
+ <cep>20510060</cep>
7
+ <cidade>
8
+ <estadoId>19</estadoId>
9
+ <id>7043</id>
10
+ <nome>Rio de Janeiro</nome>
11
+ </cidade>
12
+ <cidadeId>7043</cidadeId>
13
+ <complemento>807</complemento>
14
+ <cookie>0000097QgXvo9pYpqTFi1p21BBPvV0Al</cookie>
15
+ <cpf>09532034765</cpf>
16
+ <criacao>2009-05-08T00:00:00-03:00</criacao>
17
+ <dataNascimento>1983-02-22T00:00:00-03:00</dataNascimento>
18
+ <emailPrincipal>fab1@spam.la</emailPrincipal>
19
+ <endereco>Rua Uruguai</endereco>
20
+ <estado>
21
+ <id>19</id>
22
+ <nome>Rio de Janeiro</nome>
23
+ <paisId>1</paisId>
24
+ <sigla>RJ</sigla>
25
+ </estado>
26
+ <estadoId>19</estadoId>
27
+ <ipCadastro>127.0.0.1</ipCadastro>
28
+ <login>fabricio_fab1</login>
29
+ <modulos>
30
+ <criacao>2009-05-08T10:04:35-03:00</criacao>
31
+ <moduloID>2</moduloID>
32
+ <pessoaID>21737810</pessoaID>
33
+ </modulos>
34
+ <modulos>
35
+ <alteracao>2011-04-14T18:04:15-03:00</alteracao>
36
+ <criacao>2009-05-08T10:04:35-03:00</criacao>
37
+ <moduloID>1</moduloID>
38
+ <pessoaID>21737810</pessoaID>
39
+ </modulos>
40
+ <modulos>
41
+ <criacao>2009-05-08T10:04:35-03:00</criacao>
42
+ <moduloID>3</moduloID>
43
+ <pessoaID>21737810</pessoaID>
44
+ </modulos>
45
+ <modulos>
46
+ <criacao>2009-05-08T10:04:35-03:00</criacao>
47
+ <moduloID>4</moduloID>
48
+ <pessoaID>21737810</pessoaID>
49
+ </modulos>
50
+ <modulos>
51
+ <criacao>2009-05-08T10:04:35-03:00</criacao>
52
+ <moduloID>7</moduloID>
53
+ <pessoaID>21737810</pessoaID>
54
+ </modulos>
55
+ <nome>Fabricio Rodrigo Lopes</nome>
56
+ <numero>59</numero>
57
+ <optinCelular>false</optinCelular>
58
+ <optinGlobo>true</optinGlobo>
59
+ <optinParceiros>true</optinParceiros>
60
+ <origemId>181</origemId>
61
+ <pais>
62
+ <id>1</id>
63
+ <nome>Brasil</nome>
64
+ <sigla>BR</sigla>
65
+ </pais>
66
+ <paisId>1</paisId>
67
+ <perguntaId>3</perguntaId>
68
+ <resposta>preto</resposta>
69
+ <servicoOrigemId>807</servicoOrigemId>
70
+ <sexo>MASCULINO</sexo>
71
+ <status>ATIVO</status>
72
+ <telefoneCelular>99999999</telefoneCelular>
73
+ <telefoneCelularDdd>21</telefoneCelularDdd>
74
+ <telefoneResidencial>22881060</telefoneResidencial>
75
+ <telefoneResidencialDdd>21</telefoneResidencialDdd>
76
+ <tipoUsuario>NAO_ASSINANTE</tipoUsuario>
77
+ </pessoa>
metadata ADDED
@@ -0,0 +1,173 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: oa-cadun
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 1
10
+ version: 0.1.1
11
+ platform: ruby
12
+ authors:
13
+ - Bruno Azisaka Maciel
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-05-16 00:00:00 -03:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: oa-core
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: nokogiri
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :runtime
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: rack
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ type: :development
62
+ version_requirements: *id003
63
+ - !ruby/object:Gem::Dependency
64
+ name: rspec
65
+ prerelease: false
66
+ requirement: &id004 !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ hash: 3
72
+ segments:
73
+ - 0
74
+ version: "0"
75
+ type: :development
76
+ version_requirements: *id004
77
+ - !ruby/object:Gem::Dependency
78
+ name: rr
79
+ prerelease: false
80
+ requirement: &id005 !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ hash: 3
86
+ segments:
87
+ - 0
88
+ version: "0"
89
+ type: :development
90
+ version_requirements: *id005
91
+ - !ruby/object:Gem::Dependency
92
+ name: fakeweb
93
+ prerelease: false
94
+ requirement: &id006 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ hash: 3
100
+ segments:
101
+ - 0
102
+ version: "0"
103
+ type: :development
104
+ version_requirements: *id006
105
+ description: The goal of this gem is to allow the developer to use CadUn (a login webservice made by Globo.com) in any web app using OmniAuth
106
+ email:
107
+ - bruno@azisaka.com.br
108
+ executables: []
109
+
110
+ extensions: []
111
+
112
+ extra_rdoc_files: []
113
+
114
+ files:
115
+ - .gitignore
116
+ - .rspec
117
+ - .travis.yml
118
+ - Gemfile
119
+ - README.md
120
+ - Rakefile
121
+ - lib/oa-cadun.rb
122
+ - lib/oa-cadun/gateway.rb
123
+ - lib/oa-cadun/user.rb
124
+ - lib/omni_auth/strategies/cadun.rb
125
+ - lib/version.rb
126
+ - oa-cadun.gemspec
127
+ - spec/oa-cadun/gateway_spec.rb
128
+ - spec/oa-cadun/user_spec.rb
129
+ - spec/omni_auth/strategies/cadun_spec.rb
130
+ - spec/spec_helper.rb
131
+ - spec/support/fixtures/autorizacao.xml
132
+ - spec/support/fixtures/pessoa.xml
133
+ has_rdoc: true
134
+ homepage: ""
135
+ licenses: []
136
+
137
+ post_install_message:
138
+ rdoc_options: []
139
+
140
+ require_paths:
141
+ - lib
142
+ required_ruby_version: !ruby/object:Gem::Requirement
143
+ none: false
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ hash: 3
148
+ segments:
149
+ - 0
150
+ version: "0"
151
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
+ none: false
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ hash: 3
157
+ segments:
158
+ - 0
159
+ version: "0"
160
+ requirements: []
161
+
162
+ rubyforge_project:
163
+ rubygems_version: 1.3.7
164
+ signing_key:
165
+ specification_version: 3
166
+ summary: OmniAuth strategy for CadUn
167
+ test_files:
168
+ - spec/oa-cadun/gateway_spec.rb
169
+ - spec/oa-cadun/user_spec.rb
170
+ - spec/omni_auth/strategies/cadun_spec.rb
171
+ - spec/spec_helper.rb
172
+ - spec/support/fixtures/autorizacao.xml
173
+ - spec/support/fixtures/pessoa.xml