sso_clyent 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +111 -0
- data/Rakefile +40 -0
- data/app/assets/javascripts/sso_clyent/application.js +15 -0
- data/app/assets/stylesheets/sso_clyent/application.css +13 -0
- data/app/controllers/sso_clyent/application_controller.rb +5 -0
- data/app/controllers/sso_clyent/user_sessions_controller.rb +41 -0
- data/app/helpers/sso_clyent/application_helper.rb +4 -0
- data/app/views/layouts/sso_clyent/application.html.erb +14 -0
- data/config/routes.rb +10 -0
- data/lib/sso_clyent/base.rb +1 -0
- data/lib/sso_clyent/controllers/current_user_helpers.rb +28 -0
- data/lib/sso_clyent/engine.rb +24 -0
- data/lib/sso_clyent/omniauth/strategies/sso.rb +36 -0
- data/lib/sso_clyent/version.rb +3 -0
- data/lib/sso_clyent.rb +43 -0
- data/lib/tasks/sso_clyent_tasks.rake +4 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/home_controller.rb +6 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/user.rb +3 -0
- data/spec/dummy/app/views/home/index.html.erb +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config/application.rb +71 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +68 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +39 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/sso_clyent.rb +2 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +7 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20121125194622_create_users.rb +10 -0
- data/spec/dummy/db/schema.rb +23 -0
- data/spec/dummy/log/development.log +43 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/spec_helper.rb +15 -0
- metadata +190 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = '7905f2875675feae11d7032b5fe4e2c5f312183636f94d0cbe448d53e2908877f81daa9fc970d61ce89420cd19e7df64ca4d50ae977928a526c229821147349b'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20121125194622) do
|
15
|
+
|
16
|
+
create_table "users", :force => true do |t|
|
17
|
+
t.integer "uid"
|
18
|
+
t.string "email"
|
19
|
+
t.datetime "created_at", :null => false
|
20
|
+
t.datetime "updated_at", :null => false
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
Started GET "/" for 127.0.0.1 at 2013-04-02 00:11:18 +0200
|
4
|
+
Connecting to database specified by database.yml
|
5
|
+
Processing by HomeController#index as HTML
|
6
|
+
Redirected to http://localhost:3002/sso/auth/sso
|
7
|
+
Filter chain halted as :login_required rendered or redirected
|
8
|
+
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
|
9
|
+
|
10
|
+
|
11
|
+
Started GET "/sso/auth/sso" for 127.0.0.1 at 2013-04-02 00:11:18 +0200
|
12
|
+
Connecting to database specified by database.yml
|
13
|
+
|
14
|
+
|
15
|
+
Started GET "/" for 127.0.0.1 at 2013-04-02 00:24:30 +0200
|
16
|
+
Processing by HomeController#index as HTML
|
17
|
+
Redirected to http://localhost:3001/sso/auth/sso
|
18
|
+
Filter chain halted as :login_required rendered or redirected
|
19
|
+
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
|
20
|
+
|
21
|
+
|
22
|
+
Started GET "/sso/auth/sso" for 127.0.0.1 at 2013-04-02 00:24:30 +0200
|
23
|
+
|
24
|
+
|
25
|
+
Started GET "/" for 127.0.0.1 at 2013-04-02 00:25:00 +0200
|
26
|
+
Processing by HomeController#index as HTML
|
27
|
+
Redirected to http://localhost:3001/sso/auth/sso
|
28
|
+
Filter chain halted as :login_required rendered or redirected
|
29
|
+
Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
|
30
|
+
|
31
|
+
|
32
|
+
Started GET "/sso/auth/sso" for 127.0.0.1 at 2013-04-02 00:25:00 +0200
|
33
|
+
Connecting to database specified by database.yml
|
34
|
+
|
35
|
+
|
36
|
+
Started GET "/" for 127.0.0.1 at 2013-04-02 00:25:26 +0200
|
37
|
+
Processing by HomeController#index as HTML
|
38
|
+
Redirected to http://localhost:3001/sso/auth/sso
|
39
|
+
Filter chain halted as :login_required rendered or redirected
|
40
|
+
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
|
41
|
+
|
42
|
+
|
43
|
+
Started GET "/sso/auth/sso" for 127.0.0.1 at 2013-04-02 00:25:26 +0200
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
</div>
|
24
|
+
</body>
|
25
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Configure Rails Envinronment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
4
|
+
|
5
|
+
require 'rspec/rails'
|
6
|
+
|
7
|
+
ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
|
8
|
+
|
9
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
10
|
+
# in spec/support/ and its subdirectories.
|
11
|
+
Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
|
12
|
+
|
13
|
+
RSpec.configure do |config|
|
14
|
+
config.use_transactional_fixtures = true
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sso_clyent
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- NicoArbogast
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-08-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.2.8
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.8
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: omniauth-oauth2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mysql2
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: See sso_provyder for the provider part. Based on Devise, Authentifyd
|
70
|
+
and joshsoftware/sso-devise-omniauth-client. Parts directly taken from https://github.com/joshsoftware/sso-devise-omniauth-client
|
71
|
+
email:
|
72
|
+
- nicolas.arbogast@gmail.com
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- app/assets/javascripts/sso_clyent/application.js
|
78
|
+
- app/assets/stylesheets/sso_clyent/application.css
|
79
|
+
- app/controllers/sso_clyent/application_controller.rb
|
80
|
+
- app/controllers/sso_clyent/user_sessions_controller.rb
|
81
|
+
- app/helpers/sso_clyent/application_helper.rb
|
82
|
+
- app/views/layouts/sso_clyent/application.html.erb
|
83
|
+
- config/routes.rb
|
84
|
+
- lib/sso_clyent/base.rb
|
85
|
+
- lib/sso_clyent/controllers/current_user_helpers.rb
|
86
|
+
- lib/sso_clyent/engine.rb
|
87
|
+
- lib/sso_clyent/omniauth/strategies/sso.rb
|
88
|
+
- lib/sso_clyent/version.rb
|
89
|
+
- lib/sso_clyent.rb
|
90
|
+
- lib/tasks/sso_clyent_tasks.rake
|
91
|
+
- MIT-LICENSE
|
92
|
+
- Rakefile
|
93
|
+
- README.rdoc
|
94
|
+
- spec/dummy/app/assets/javascripts/application.js
|
95
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
96
|
+
- spec/dummy/app/controllers/application_controller.rb
|
97
|
+
- spec/dummy/app/controllers/home_controller.rb
|
98
|
+
- spec/dummy/app/helpers/application_helper.rb
|
99
|
+
- spec/dummy/app/models/user.rb
|
100
|
+
- spec/dummy/app/views/home/index.html.erb
|
101
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
102
|
+
- spec/dummy/config/application.rb
|
103
|
+
- spec/dummy/config/boot.rb
|
104
|
+
- spec/dummy/config/database.yml
|
105
|
+
- spec/dummy/config/environment.rb
|
106
|
+
- spec/dummy/config/environments/development.rb
|
107
|
+
- spec/dummy/config/environments/production.rb
|
108
|
+
- spec/dummy/config/environments/test.rb
|
109
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
110
|
+
- spec/dummy/config/initializers/inflections.rb
|
111
|
+
- spec/dummy/config/initializers/mime_types.rb
|
112
|
+
- spec/dummy/config/initializers/secret_token.rb
|
113
|
+
- spec/dummy/config/initializers/session_store.rb
|
114
|
+
- spec/dummy/config/initializers/sso_clyent.rb
|
115
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
116
|
+
- spec/dummy/config/locales/en.yml
|
117
|
+
- spec/dummy/config/routes.rb
|
118
|
+
- spec/dummy/config.ru
|
119
|
+
- spec/dummy/db/migrate/20121125194622_create_users.rb
|
120
|
+
- spec/dummy/db/schema.rb
|
121
|
+
- spec/dummy/log/development.log
|
122
|
+
- spec/dummy/public/404.html
|
123
|
+
- spec/dummy/public/422.html
|
124
|
+
- spec/dummy/public/500.html
|
125
|
+
- spec/dummy/public/favicon.ico
|
126
|
+
- spec/dummy/Rakefile
|
127
|
+
- spec/dummy/README.rdoc
|
128
|
+
- spec/dummy/script/rails
|
129
|
+
- spec/spec_helper.rb
|
130
|
+
homepage: https://github.com/NicoArbogast/sso_clyent
|
131
|
+
licenses: []
|
132
|
+
metadata: {}
|
133
|
+
post_install_message:
|
134
|
+
rdoc_options: []
|
135
|
+
require_paths:
|
136
|
+
- lib
|
137
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ! '>='
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
requirements: []
|
148
|
+
rubyforge_project:
|
149
|
+
rubygems_version: 2.0.7
|
150
|
+
signing_key:
|
151
|
+
specification_version: 4
|
152
|
+
summary: A Rails Engine providing an Omniauth client with single sign on features
|
153
|
+
in a minute.
|
154
|
+
test_files:
|
155
|
+
- spec/dummy/app/assets/javascripts/application.js
|
156
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
157
|
+
- spec/dummy/app/controllers/application_controller.rb
|
158
|
+
- spec/dummy/app/controllers/home_controller.rb
|
159
|
+
- spec/dummy/app/helpers/application_helper.rb
|
160
|
+
- spec/dummy/app/models/user.rb
|
161
|
+
- spec/dummy/app/views/home/index.html.erb
|
162
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
163
|
+
- spec/dummy/config/application.rb
|
164
|
+
- spec/dummy/config/boot.rb
|
165
|
+
- spec/dummy/config/database.yml
|
166
|
+
- spec/dummy/config/environment.rb
|
167
|
+
- spec/dummy/config/environments/development.rb
|
168
|
+
- spec/dummy/config/environments/production.rb
|
169
|
+
- spec/dummy/config/environments/test.rb
|
170
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
171
|
+
- spec/dummy/config/initializers/inflections.rb
|
172
|
+
- spec/dummy/config/initializers/mime_types.rb
|
173
|
+
- spec/dummy/config/initializers/secret_token.rb
|
174
|
+
- spec/dummy/config/initializers/session_store.rb
|
175
|
+
- spec/dummy/config/initializers/sso_clyent.rb
|
176
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
177
|
+
- spec/dummy/config/locales/en.yml
|
178
|
+
- spec/dummy/config/routes.rb
|
179
|
+
- spec/dummy/config.ru
|
180
|
+
- spec/dummy/db/migrate/20121125194622_create_users.rb
|
181
|
+
- spec/dummy/db/schema.rb
|
182
|
+
- spec/dummy/log/development.log
|
183
|
+
- spec/dummy/public/404.html
|
184
|
+
- spec/dummy/public/422.html
|
185
|
+
- spec/dummy/public/500.html
|
186
|
+
- spec/dummy/public/favicon.ico
|
187
|
+
- spec/dummy/Rakefile
|
188
|
+
- spec/dummy/README.rdoc
|
189
|
+
- spec/dummy/script/rails
|
190
|
+
- spec/spec_helper.rb
|