vidibus-user 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +22 -0
- data/.rspec +2 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +128 -0
- data/LICENSE +20 -0
- data/README.rdoc +31 -0
- data/Rakefile +41 -0
- data/VERSION +1 -0
- data/app/models/user.rb +4 -0
- data/config/routes.rb +5 -0
- data/lib/vidibus-user.rb +17 -0
- data/lib/vidibus/user.rb +3 -0
- data/lib/vidibus/user/callback_app.rb +19 -0
- data/lib/vidibus/user/extensions.rb +5 -0
- data/lib/vidibus/user/extensions/controller.rb +53 -0
- data/lib/vidibus/user/mongoid.rb +14 -0
- data/lib/vidibus/user/warden_strategy.rb +64 -0
- data/spec/spec_helper.rb +26 -0
- data/vidibus-user.gemspec +78 -0
- metadata +176 -0
data/.document
ADDED
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source :rubygems
|
2
|
+
gem "rails", "~> 3.0.0"
|
3
|
+
gem "mongoid", "~> 2.0.0.beta.20"
|
4
|
+
gem "warden"
|
5
|
+
gem "oauth2"
|
6
|
+
gem "json"
|
7
|
+
gem "vidibus-uuid"
|
8
|
+
gem "vidibus-secure"
|
9
|
+
|
10
|
+
# Development dependecies
|
11
|
+
gem "jeweler"
|
12
|
+
gem "rake"
|
13
|
+
gem "rspec", "~> 2.0.0.beta.20"
|
14
|
+
gem "rr"
|
15
|
+
gem "relevance-rcov"
|
16
|
+
gem "webmock"
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
abstract (1.0.0)
|
5
|
+
actionmailer (3.0.0)
|
6
|
+
actionpack (= 3.0.0)
|
7
|
+
mail (~> 2.2.5)
|
8
|
+
actionpack (3.0.0)
|
9
|
+
activemodel (= 3.0.0)
|
10
|
+
activesupport (= 3.0.0)
|
11
|
+
builder (~> 2.1.2)
|
12
|
+
erubis (~> 2.6.6)
|
13
|
+
i18n (~> 0.4.1)
|
14
|
+
rack (~> 1.2.1)
|
15
|
+
rack-mount (~> 0.6.12)
|
16
|
+
rack-test (~> 0.5.4)
|
17
|
+
tzinfo (~> 0.3.23)
|
18
|
+
activemodel (3.0.0)
|
19
|
+
activesupport (= 3.0.0)
|
20
|
+
builder (~> 2.1.2)
|
21
|
+
i18n (~> 0.4.1)
|
22
|
+
activerecord (3.0.0)
|
23
|
+
activemodel (= 3.0.0)
|
24
|
+
activesupport (= 3.0.0)
|
25
|
+
arel (~> 1.0.0)
|
26
|
+
tzinfo (~> 0.3.23)
|
27
|
+
activeresource (3.0.0)
|
28
|
+
activemodel (= 3.0.0)
|
29
|
+
activesupport (= 3.0.0)
|
30
|
+
activesupport (3.0.0)
|
31
|
+
addressable (2.2.1)
|
32
|
+
arel (1.0.1)
|
33
|
+
activesupport (~> 3.0.0)
|
34
|
+
bson (1.0.9)
|
35
|
+
builder (2.1.2)
|
36
|
+
crack (0.1.8)
|
37
|
+
diff-lcs (1.1.2)
|
38
|
+
erubis (2.6.6)
|
39
|
+
abstract (>= 1.0.0)
|
40
|
+
faraday (0.4.6)
|
41
|
+
addressable (>= 2.1.1)
|
42
|
+
rack (>= 1.0.1)
|
43
|
+
gemcutter (0.6.1)
|
44
|
+
git (1.2.5)
|
45
|
+
httparty (0.6.1)
|
46
|
+
crack (= 0.1.8)
|
47
|
+
i18n (0.4.1)
|
48
|
+
jeweler (1.4.0)
|
49
|
+
gemcutter (>= 0.1.0)
|
50
|
+
git (>= 1.2.5)
|
51
|
+
rubyforge (>= 2.0.0)
|
52
|
+
json_pure (1.4.6)
|
53
|
+
mail (2.2.6.1)
|
54
|
+
activesupport (>= 2.3.6)
|
55
|
+
mime-types
|
56
|
+
treetop (>= 1.4.5)
|
57
|
+
mime-types (1.16)
|
58
|
+
mongo (1.0.9)
|
59
|
+
bson (>= 1.0.5)
|
60
|
+
mongoid (2.0.0.beta.19)
|
61
|
+
activemodel (~> 3.0)
|
62
|
+
mongo (= 1.0.9)
|
63
|
+
tzinfo (~> 0.3.22)
|
64
|
+
will_paginate (~> 3.0.pre)
|
65
|
+
multi_json (0.0.4)
|
66
|
+
oauth2 (0.0.13)
|
67
|
+
faraday (~> 0.4.1)
|
68
|
+
multi_json (>= 0.0.4)
|
69
|
+
polyglot (0.3.1)
|
70
|
+
rack (1.2.1)
|
71
|
+
rack-mount (0.6.13)
|
72
|
+
rack (>= 1.0.0)
|
73
|
+
rack-test (0.5.6)
|
74
|
+
rack (>= 1.0)
|
75
|
+
rails (3.0.0)
|
76
|
+
actionmailer (= 3.0.0)
|
77
|
+
actionpack (= 3.0.0)
|
78
|
+
activerecord (= 3.0.0)
|
79
|
+
activeresource (= 3.0.0)
|
80
|
+
activesupport (= 3.0.0)
|
81
|
+
bundler (~> 1.0.0)
|
82
|
+
railties (= 3.0.0)
|
83
|
+
railties (3.0.0)
|
84
|
+
actionpack (= 3.0.0)
|
85
|
+
activesupport (= 3.0.0)
|
86
|
+
rake (>= 0.8.4)
|
87
|
+
thor (~> 0.14.0)
|
88
|
+
rake (0.8.7)
|
89
|
+
relevance-rcov (0.9.2.1)
|
90
|
+
rr (1.0.0)
|
91
|
+
rspec (2.0.0.beta.22)
|
92
|
+
rspec-core (= 2.0.0.beta.22)
|
93
|
+
rspec-expectations (= 2.0.0.beta.22)
|
94
|
+
rspec-mocks (= 2.0.0.beta.22)
|
95
|
+
rspec-core (2.0.0.beta.22)
|
96
|
+
rspec-expectations (2.0.0.beta.22)
|
97
|
+
diff-lcs (>= 1.1.2)
|
98
|
+
rspec-mocks (2.0.0.beta.22)
|
99
|
+
rspec-core (= 2.0.0.beta.22)
|
100
|
+
rspec-expectations (= 2.0.0.beta.22)
|
101
|
+
rubyforge (2.0.4)
|
102
|
+
json_pure (>= 1.1.7)
|
103
|
+
thor (0.14.2)
|
104
|
+
treetop (1.4.8)
|
105
|
+
polyglot (>= 0.3.1)
|
106
|
+
tzinfo (0.3.23)
|
107
|
+
warden (0.10.7)
|
108
|
+
rack (>= 1.0.0)
|
109
|
+
webmock (1.3.5)
|
110
|
+
addressable (>= 2.1.1)
|
111
|
+
crack (>= 0.1.7)
|
112
|
+
will_paginate (3.0.pre2)
|
113
|
+
|
114
|
+
PLATFORMS
|
115
|
+
ruby
|
116
|
+
|
117
|
+
DEPENDENCIES
|
118
|
+
httparty
|
119
|
+
jeweler
|
120
|
+
mongoid (~> 2.0.0.beta.20)
|
121
|
+
oauth2
|
122
|
+
rails (~> 3.0.0)
|
123
|
+
rake
|
124
|
+
relevance-rcov
|
125
|
+
rr
|
126
|
+
rspec (~> 2.0.0.beta.20)
|
127
|
+
warden
|
128
|
+
webmock
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 Andre Pankratz
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
= vidibus-user
|
2
|
+
|
3
|
+
Provides single sign-on through OAuth2 authentication. It adds a simple user model to your application which can be extended easily.
|
4
|
+
|
5
|
+
This gem is part of the open source SOA framework Vidibus: vidibus.org.
|
6
|
+
|
7
|
+
It is far from being complete, but this will change soon.
|
8
|
+
|
9
|
+
== Installation
|
10
|
+
|
11
|
+
Add the dependency to the Gemfile of your application:
|
12
|
+
|
13
|
+
gem "vidibus-user"
|
14
|
+
|
15
|
+
Then call bundle install on your console.
|
16
|
+
|
17
|
+
|
18
|
+
== Dependencies
|
19
|
+
|
20
|
+
In order to perform authentication, this gem depends on services provided by the vidibus-service gem.
|
21
|
+
|
22
|
+
|
23
|
+
== TODO
|
24
|
+
|
25
|
+
* Write specs
|
26
|
+
* Explain usage and integration
|
27
|
+
|
28
|
+
|
29
|
+
== Copyright
|
30
|
+
|
31
|
+
Copyright (c) 2010 Andre Pankratz. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "rake"
|
3
|
+
require "rake/rdoctask"
|
4
|
+
require "rspec"
|
5
|
+
require "rspec/core/rake_task"
|
6
|
+
|
7
|
+
begin
|
8
|
+
require "jeweler"
|
9
|
+
Jeweler::Tasks.new do |gem|
|
10
|
+
gem.name = "vidibus-user"
|
11
|
+
gem.summary = %Q{Single sign-on for Vidibus applications.}
|
12
|
+
gem.description = %Q{Provides single sign-on and a local user model.}
|
13
|
+
gem.email = "andre@vidibus.com"
|
14
|
+
gem.homepage = "http://github.com/vidibus/vidibus-user"
|
15
|
+
gem.authors = ["Andre Pankratz"]
|
16
|
+
gem.add_dependency "rails", "~> 3.0.0"
|
17
|
+
gem.add_dependency "mongoid", "~> 2.0.0.beta.20"
|
18
|
+
gem.add_dependency "warden"
|
19
|
+
gem.add_dependency "oauth2"
|
20
|
+
gem.add_dependency "vidibus-secure"
|
21
|
+
gem.add_dependency "vidibus-uuid"
|
22
|
+
end
|
23
|
+
Jeweler::GemcutterTasks.new
|
24
|
+
rescue LoadError
|
25
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
26
|
+
end
|
27
|
+
|
28
|
+
Rspec::Core::RakeTask.new(:rcov) do |t|
|
29
|
+
t.pattern = "spec/**/*_spec.rb"
|
30
|
+
t.rcov = true
|
31
|
+
t.rcov_opts = ["--exclude", "^spec,/gems/"]
|
32
|
+
end
|
33
|
+
|
34
|
+
Rake::RDocTask.new do |rdoc|
|
35
|
+
version = File.exist?("VERSION") ? File.read("VERSION") : ""
|
36
|
+
rdoc.rdoc_dir = "rdoc"
|
37
|
+
rdoc.title = "vidibus-user #{version}"
|
38
|
+
rdoc.rdoc_files.include("README*")
|
39
|
+
rdoc.rdoc_files.include("lib/**/*.rb")
|
40
|
+
rdoc.options << "--charset=utf-8"
|
41
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.0
|
data/app/models/user.rb
ADDED
data/config/routes.rb
ADDED
data/lib/vidibus-user.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require "rails"
|
2
|
+
|
3
|
+
$:.unshift(File.join(File.dirname(__FILE__), "vidibus"))
|
4
|
+
require "user"
|
5
|
+
|
6
|
+
module Vidibus
|
7
|
+
module User
|
8
|
+
class Engine < ::Rails::Engine
|
9
|
+
|
10
|
+
# Add warden to rack stack and use connector strategy.
|
11
|
+
config.app_middleware.use Warden::Manager do |manager|
|
12
|
+
manager.default_strategies :connector
|
13
|
+
manager.default_scope = :user
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/vidibus/user.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Vidibus
|
2
|
+
module User
|
3
|
+
class CallbackApp
|
4
|
+
def self.call(env)
|
5
|
+
self.new.call(env)
|
6
|
+
end
|
7
|
+
|
8
|
+
# This is just a rack endpoint for Connector authentication. It will be called
|
9
|
+
# by the Connector after requesting an authentication code.
|
10
|
+
def call(env)
|
11
|
+
env["warden"].authenticate!(:scope => :user)
|
12
|
+
|
13
|
+
# Redirect to return path after signin
|
14
|
+
return_to = env["rack.session"][:user_return_to] || "/"
|
15
|
+
[302, {"Content-Type" => "text/html", "Location" => return_to}, ["Login successful."]]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Vidibus
|
2
|
+
module User
|
3
|
+
module Extensions
|
4
|
+
|
5
|
+
# Contains extensions of ApplicationController.
|
6
|
+
module Controller
|
7
|
+
extend ActiveSupport::Concern
|
8
|
+
|
9
|
+
included do
|
10
|
+
helper_method :warden, :signed_in?, :user_signed_in?, :current_user, :user_session
|
11
|
+
end
|
12
|
+
|
13
|
+
protected
|
14
|
+
|
15
|
+
# Accessor for the warden proxy instance.
|
16
|
+
def warden
|
17
|
+
request.env["warden"]
|
18
|
+
end
|
19
|
+
|
20
|
+
# Performs login on Connector service.
|
21
|
+
def authenticate_user!
|
22
|
+
return if user_signed_in?
|
23
|
+
store_location
|
24
|
+
warden.authenticate!(:scope => :user)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns session of currently signed in user.
|
28
|
+
def user_session
|
29
|
+
current_user and warden.session(:user)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns user currently logged in.
|
33
|
+
def current_user
|
34
|
+
warden.user(:user)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns true if user is logged in.
|
38
|
+
def user_signed_in?
|
39
|
+
warden.authenticated?(:user)
|
40
|
+
end
|
41
|
+
alias_method :signed_in?, :user_signed_in?
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
# Stores current location in session to perform redirect after signin in session
|
46
|
+
def store_location
|
47
|
+
Rails.logger.error 'store_location: '+request.fullpath
|
48
|
+
session[:user_return_to] = request.fullpath
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "warden"
|
3
|
+
require "oauth2"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
Warden::Strategies.add(:connector) do
|
7
|
+
def valid?
|
8
|
+
true
|
9
|
+
end
|
10
|
+
|
11
|
+
# Sets credentials for Connector login in session.
|
12
|
+
# The client_secret will be validated through Vidibus' OauthServer when issuing an OAuth token.
|
13
|
+
# To protect the service's secret, a custom signature will be sent instead.
|
14
|
+
def credentials
|
15
|
+
@credentials ||= begin
|
16
|
+
connector = Service.connector
|
17
|
+
raise "Failed to set Connector credentials! Service has not been set up, Connector data is missing." unless this and connector
|
18
|
+
{
|
19
|
+
:client_id => this.uuid,
|
20
|
+
:client_secret => Vidibus::Secure.sign("#{connector.url}#{this.uuid}", this.secret),
|
21
|
+
:connector_url => connector.url
|
22
|
+
}
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# Returns this service
|
27
|
+
def this
|
28
|
+
@this ||= Service.this
|
29
|
+
end
|
30
|
+
|
31
|
+
# Returns OAuth client
|
32
|
+
def client
|
33
|
+
@client ||= OAuth2::Client.new(credentials[:client_id], credentials[:client_secret], :site => credentials[:connector_url])
|
34
|
+
end
|
35
|
+
|
36
|
+
def authenticate!
|
37
|
+
code = params["code"]
|
38
|
+
redirect_url = "#{host}/authenticate_user"
|
39
|
+
|
40
|
+
# Fetch code first
|
41
|
+
return redirect!(client.web_server.authorize_url(:redirect_url => redirect_url)) unless code
|
42
|
+
|
43
|
+
# Exchange code for token and fetch user data
|
44
|
+
access_token = client.web_server.get_access_token(code, :redirect_url => redirect_url)
|
45
|
+
user_data = JSON.parse(access_token.get("/me"))
|
46
|
+
|
47
|
+
unless user = User.where(:email => user_data["email"]).first
|
48
|
+
user = User.create!(user_data)
|
49
|
+
end
|
50
|
+
success!(user)
|
51
|
+
rescue OAuth2::HTTPError => e
|
52
|
+
raise e.response.body
|
53
|
+
end
|
54
|
+
|
55
|
+
# Returns current host.
|
56
|
+
def host
|
57
|
+
"#{protocol}#{env["HTTP_HOST"]}"
|
58
|
+
end
|
59
|
+
|
60
|
+
# Returns protocol depending on SERVER_PORT.
|
61
|
+
def protocol
|
62
|
+
env["SERVER_PORT"] == 443 ? "https://" : "http://"
|
63
|
+
end
|
64
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
3
|
+
|
4
|
+
require "rubygems"
|
5
|
+
require "active_support/core_ext"
|
6
|
+
require "rspec"
|
7
|
+
require "rr"
|
8
|
+
require "mongoid"
|
9
|
+
require "webmock/rspec"
|
10
|
+
|
11
|
+
require "vidibus-user"
|
12
|
+
|
13
|
+
Mongoid.configure do |config|
|
14
|
+
name = "vidibus-user_test"
|
15
|
+
host = "localhost"
|
16
|
+
config.master = Mongo::Connection.new.db(name)
|
17
|
+
config.logger = nil
|
18
|
+
end
|
19
|
+
|
20
|
+
RSpec.configure do |config|
|
21
|
+
config.include WebMock
|
22
|
+
config.mock_with :rr
|
23
|
+
config.before(:each) do
|
24
|
+
Mongoid.master.collections.select {|c| c.name !~ /system/}.each(&:drop)
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{vidibus-user}
|
8
|
+
s.version = "0.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Andre Pankratz"]
|
12
|
+
s.date = %q{2010-10-02}
|
13
|
+
s.description = %q{Provides single sign-on and a local user model.}
|
14
|
+
s.email = %q{andre@vidibus.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
".rspec",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"LICENSE",
|
26
|
+
"README.rdoc",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"app/models/user.rb",
|
30
|
+
"config/routes.rb",
|
31
|
+
"lib/vidibus-user.rb",
|
32
|
+
"lib/vidibus/user.rb",
|
33
|
+
"lib/vidibus/user/callback_app.rb",
|
34
|
+
"lib/vidibus/user/extensions.rb",
|
35
|
+
"lib/vidibus/user/extensions/controller.rb",
|
36
|
+
"lib/vidibus/user/mongoid.rb",
|
37
|
+
"lib/vidibus/user/warden_strategy.rb",
|
38
|
+
"spec/spec_helper.rb",
|
39
|
+
"vidibus-user.gemspec"
|
40
|
+
]
|
41
|
+
s.homepage = %q{http://github.com/vidibus/vidibus-user}
|
42
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
43
|
+
s.require_paths = ["lib"]
|
44
|
+
s.rubygems_version = %q{1.3.7}
|
45
|
+
s.summary = %q{Single sign-on for Vidibus applications.}
|
46
|
+
s.test_files = [
|
47
|
+
"spec/spec_helper.rb"
|
48
|
+
]
|
49
|
+
|
50
|
+
if s.respond_to? :specification_version then
|
51
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
52
|
+
s.specification_version = 3
|
53
|
+
|
54
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
55
|
+
s.add_runtime_dependency(%q<rails>, ["~> 3.0.0"])
|
56
|
+
s.add_runtime_dependency(%q<mongoid>, ["~> 2.0.0.beta.20"])
|
57
|
+
s.add_runtime_dependency(%q<warden>, [">= 0"])
|
58
|
+
s.add_runtime_dependency(%q<oauth2>, [">= 0"])
|
59
|
+
s.add_runtime_dependency(%q<vidibus-secure>, [">= 0"])
|
60
|
+
s.add_runtime_dependency(%q<vidibus-uuid>, [">= 0"])
|
61
|
+
else
|
62
|
+
s.add_dependency(%q<rails>, ["~> 3.0.0"])
|
63
|
+
s.add_dependency(%q<mongoid>, ["~> 2.0.0.beta.20"])
|
64
|
+
s.add_dependency(%q<warden>, [">= 0"])
|
65
|
+
s.add_dependency(%q<oauth2>, [">= 0"])
|
66
|
+
s.add_dependency(%q<vidibus-secure>, [">= 0"])
|
67
|
+
s.add_dependency(%q<vidibus-uuid>, [">= 0"])
|
68
|
+
end
|
69
|
+
else
|
70
|
+
s.add_dependency(%q<rails>, ["~> 3.0.0"])
|
71
|
+
s.add_dependency(%q<mongoid>, ["~> 2.0.0.beta.20"])
|
72
|
+
s.add_dependency(%q<warden>, [">= 0"])
|
73
|
+
s.add_dependency(%q<oauth2>, [">= 0"])
|
74
|
+
s.add_dependency(%q<vidibus-secure>, [">= 0"])
|
75
|
+
s.add_dependency(%q<vidibus-uuid>, [">= 0"])
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
metadata
ADDED
@@ -0,0 +1,176 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vidibus-user
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 31
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 0.0.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Andre Pankratz
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-10-02 00:00:00 +02:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rails
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 7
|
30
|
+
segments:
|
31
|
+
- 3
|
32
|
+
- 0
|
33
|
+
- 0
|
34
|
+
version: 3.0.0
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: mongoid
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 62196427
|
46
|
+
segments:
|
47
|
+
- 2
|
48
|
+
- 0
|
49
|
+
- 0
|
50
|
+
- beta
|
51
|
+
- 20
|
52
|
+
version: 2.0.0.beta.20
|
53
|
+
type: :runtime
|
54
|
+
version_requirements: *id002
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: warden
|
57
|
+
prerelease: false
|
58
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
hash: 3
|
64
|
+
segments:
|
65
|
+
- 0
|
66
|
+
version: "0"
|
67
|
+
type: :runtime
|
68
|
+
version_requirements: *id003
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: oauth2
|
71
|
+
prerelease: false
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
hash: 3
|
78
|
+
segments:
|
79
|
+
- 0
|
80
|
+
version: "0"
|
81
|
+
type: :runtime
|
82
|
+
version_requirements: *id004
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: vidibus-secure
|
85
|
+
prerelease: false
|
86
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
hash: 3
|
92
|
+
segments:
|
93
|
+
- 0
|
94
|
+
version: "0"
|
95
|
+
type: :runtime
|
96
|
+
version_requirements: *id005
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: vidibus-uuid
|
99
|
+
prerelease: false
|
100
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
101
|
+
none: false
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
hash: 3
|
106
|
+
segments:
|
107
|
+
- 0
|
108
|
+
version: "0"
|
109
|
+
type: :runtime
|
110
|
+
version_requirements: *id006
|
111
|
+
description: Provides single sign-on and a local user model.
|
112
|
+
email: andre@vidibus.com
|
113
|
+
executables: []
|
114
|
+
|
115
|
+
extensions: []
|
116
|
+
|
117
|
+
extra_rdoc_files:
|
118
|
+
- LICENSE
|
119
|
+
- README.rdoc
|
120
|
+
files:
|
121
|
+
- .document
|
122
|
+
- .gitignore
|
123
|
+
- .rspec
|
124
|
+
- Gemfile
|
125
|
+
- Gemfile.lock
|
126
|
+
- LICENSE
|
127
|
+
- README.rdoc
|
128
|
+
- Rakefile
|
129
|
+
- VERSION
|
130
|
+
- app/models/user.rb
|
131
|
+
- config/routes.rb
|
132
|
+
- lib/vidibus-user.rb
|
133
|
+
- lib/vidibus/user.rb
|
134
|
+
- lib/vidibus/user/callback_app.rb
|
135
|
+
- lib/vidibus/user/extensions.rb
|
136
|
+
- lib/vidibus/user/extensions/controller.rb
|
137
|
+
- lib/vidibus/user/mongoid.rb
|
138
|
+
- lib/vidibus/user/warden_strategy.rb
|
139
|
+
- spec/spec_helper.rb
|
140
|
+
- vidibus-user.gemspec
|
141
|
+
has_rdoc: true
|
142
|
+
homepage: http://github.com/vidibus/vidibus-user
|
143
|
+
licenses: []
|
144
|
+
|
145
|
+
post_install_message:
|
146
|
+
rdoc_options:
|
147
|
+
- --charset=UTF-8
|
148
|
+
require_paths:
|
149
|
+
- lib
|
150
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
hash: 3
|
156
|
+
segments:
|
157
|
+
- 0
|
158
|
+
version: "0"
|
159
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
|
+
none: false
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
hash: 3
|
165
|
+
segments:
|
166
|
+
- 0
|
167
|
+
version: "0"
|
168
|
+
requirements: []
|
169
|
+
|
170
|
+
rubyforge_project:
|
171
|
+
rubygems_version: 1.3.7
|
172
|
+
signing_key:
|
173
|
+
specification_version: 3
|
174
|
+
summary: Single sign-on for Vidibus applications.
|
175
|
+
test_files:
|
176
|
+
- spec/spec_helper.rb
|