omniauth-ldap-1.0.4/ 0000755 0000041 0000041 00000000000 12261234201 014277 5 ustar www-data www-data omniauth-ldap-1.0.4/Rakefile 0000644 0000041 0000041 00000000256 12261234201 015747 0 ustar www-data www-data #!/usr/bin/env rake require "bundler/gem_tasks" require 'rspec/core/rake_task' desc 'Default: run specs.' task :default => :spec desc "Run specs" RSpec::Core::RakeTask.new omniauth-ldap-1.0.4/Gemfile 0000644 0000041 0000041 00000000241 12261234201 015567 0 ustar www-data www-data source 'http://rubygems.org' gemspec group :development, :test do gem 'guard' gem 'guard-rspec' gem 'guard-bundler' gem 'growl' gem 'rb-fsevent' end omniauth-ldap-1.0.4/.rspec 0000644 0000041 0000041 00000000011 12261234201 015404 0 ustar www-data www-data --colour omniauth-ldap-1.0.4/spec/ 0000755 0000041 0000041 00000000000 12261234201 015231 5 ustar www-data www-data omniauth-ldap-1.0.4/spec/omniauth/ 0000755 0000041 0000041 00000000000 12261234201 017055 5 ustar www-data www-data omniauth-ldap-1.0.4/spec/omniauth/strategies/ 0000755 0000041 0000041 00000000000 12261234201 021227 5 ustar www-data www-data omniauth-ldap-1.0.4/spec/omniauth/strategies/ldap_spec.rb 0000644 0000041 0000041 00000012617 12261234201 023515 0 ustar www-data www-data require 'spec_helper' describe "OmniAuth::Strategies::LDAP" do # :title => "My LDAP", # :host => '10.101.10.1', # :port => 389, # :method => :plain, # :base => 'dc=intridea, dc=com', # :uid => 'sAMAccountName', # :name_proc => Proc.new {|name| name.gsub(/@.*$/,'')} # :bind_dn => 'default_bind_dn' # :password => 'password' class MyLdapProvider < OmniAuth::Strategies::LDAP; end let(:app) do Rack::Builder.new { use OmniAuth::Test::PhonySession use MyLdapProvider, :name => 'ldap', :title => 'MyLdap Form', :host => '192.168.1.145', :base => 'dc=score, dc=local', :name_proc => Proc.new {|name| name.gsub(/@.*$/,'')} run lambda { |env| [404, {'Content-Type' => 'text/plain'}, [env.key?('omniauth.auth').to_s]] } }.to_app end let(:session) do last_request.env['rack.session'] end it 'should add a camelization for itself' do OmniAuth::Utils.camelize('ldap').should == 'LDAP' end describe '/auth/ldap' do before(:each){ get '/auth/ldap' } it 'should display a form' do last_response.status.should == 200 last_response.body.should be_include("