authentifyd 0.0.5
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 +26 -0
- data/Rakefile +34 -0
- data/app/assets/images/authentifyd/en.png +0 -0
- data/app/assets/images/authentifyd/facebook-logo.png +0 -0
- data/app/assets/images/authentifyd/fr.png +0 -0
- data/app/assets/images/authentifyd/google-logo.png +0 -0
- data/app/assets/images/authentifyd/signin_with_facebook.png +0 -0
- data/app/assets/images/authentifyd/signin_with_fb.png +0 -0
- data/app/assets/images/authentifyd/signin_with_google.png +0 -0
- data/app/assets/images/authentifyd/signin_with_twitter.png +0 -0
- data/app/assets/images/authentifyd/twitter-logo.png +0 -0
- data/app/assets/javascripts/authentifyd/application.js +15 -0
- data/app/assets/stylesheets/authentifyd/application.css +13 -0
- data/app/controllers/authentifyd/application_controller.rb +11 -0
- data/app/controllers/authentifyd/authentications_controller.rb +94 -0
- data/app/controllers/authentifyd/confirmations_controller.rb +5 -0
- data/app/controllers/authentifyd/passwords_controller.rb +4 -0
- data/app/controllers/authentifyd/registrations_controller.rb +42 -0
- data/app/controllers/authentifyd/sessions_controller.rb +13 -0
- data/app/controllers/authentifyd/unlocks_controller.rb +4 -0
- data/app/helpers/authentifyd/application_helper.rb +4 -0
- data/app/models/authentifyd.rb +5 -0
- data/app/models/authentifyd/authentication.rb +16 -0
- data/app/models/authentifyd/user.rb +66 -0
- data/app/views/authentifyd/authentications/_authentication.html.erb +15 -0
- data/app/views/authentifyd/authentications/index.html.erb +14 -0
- data/app/views/authentifyd/authentications/link.html.erb +14 -0
- data/app/views/authentifyd/confirmations/new.html.erb +25 -0
- data/app/views/authentifyd/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/authentifyd/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/authentifyd/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/authentifyd/devise/shared/_links.erb +30 -0
- data/app/views/authentifyd/layouts/_account_menu.html.haml +24 -0
- data/app/views/authentifyd/passwords/edit.html.erb +30 -0
- data/app/views/authentifyd/passwords/new.html.erb +27 -0
- data/app/views/authentifyd/registrations/_authentifyd_form.html.erb +52 -0
- data/app/views/authentifyd/registrations/edit.html.erb +1 -0
- data/app/views/authentifyd/registrations/new.html.erb +44 -0
- data/app/views/authentifyd/sessions/_social_networks.html.erb +23 -0
- data/app/views/authentifyd/sessions/new.html.erb +49 -0
- data/app/views/authentifyd/unlocks/new.html.erb +28 -0
- data/app/views/layouts/authentifyd/_navbar.html.haml +41 -0
- data/app/views/layouts/authentifyd/application.html.erb +19 -0
- data/config/initializers/devise.rb +3 -0
- data/config/initializers/omniauth.rb +119 -0
- data/config/locales/devise.en.yml +100 -0
- data/config/locales/devise.fr.yml +113 -0
- data/config/locales/en.yml +7 -0
- data/config/locales/fr.yml +7 -0
- data/config/routes.rb +30 -0
- data/db/migrate/20121120091659_create_authentifyd_users.rb +52 -0
- data/db/migrate/20121120091700_create_authentifyd_authentications.rb +11 -0
- data/db/migrate/20130827085250_add_language_to_user.rb +5 -0
- data/lib/authentifyd.rb +39 -0
- data/lib/authentifyd/engine.rb +16 -0
- data/lib/authentifyd/version.rb +3 -0
- data/lib/tasks/authentifyd_tasks.rake +4 -0
- metadata +256 -0
data/lib/authentifyd.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'devise'
|
2
|
+
require "omniauth"
|
3
|
+
require 'omniauth-facebook'
|
4
|
+
require 'omniauth-twitter'
|
5
|
+
require 'omniauth-google-oauth2'
|
6
|
+
require "haml"
|
7
|
+
require 'localyzed'
|
8
|
+
|
9
|
+
require "authentifyd/engine"
|
10
|
+
|
11
|
+
|
12
|
+
module Authentifyd
|
13
|
+
|
14
|
+
mattr_accessor :devise_config, :omniauth_config, :path, :path_prefix, :custom_head_snippet, :custom_bottom_snippet, :top_navbar_snippet
|
15
|
+
|
16
|
+
def self.devise_config
|
17
|
+
(@@devise_config || {}).reverse_merge({
|
18
|
+
:registrations_controller => 'authentifyd/registrations',
|
19
|
+
:sessions_controller => 'authentifyd/sessions',
|
20
|
+
:confirmations_controller => 'authentifyd/confirmations',
|
21
|
+
:passwords_controller => 'authentifyd/passwords',
|
22
|
+
:unlocks_controller => 'authentifyd/unlocks'
|
23
|
+
})
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.path
|
27
|
+
@@path ||= "/"
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.embeddable_callback_path(_path)
|
31
|
+
(Authentifyd.path_prefix ? "#{Authentifyd.path_prefix}/" : '') + Authentifyd.path + _path
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.configure(config = {})
|
35
|
+
@@custom_head_snippet = config[:custom_head_snippet]
|
36
|
+
@@custom_bottom_snippet = config[:custom_bottom_snippet]
|
37
|
+
@@top_navbar_snippet = config[:top_navbar_snippet]
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rails'
|
2
|
+
require 'devise'
|
3
|
+
require 'devise-encryptable'
|
4
|
+
|
5
|
+
module Authentifyd
|
6
|
+
class Engine < ::Rails::Engine
|
7
|
+
isolate_namespace Authentifyd
|
8
|
+
|
9
|
+
config.authentifyd = ActiveSupport::OrderedOptions.new
|
10
|
+
|
11
|
+
initializer "authentifyd.configure" do |app|
|
12
|
+
Authentifyd.configure(app.config.authentifyd)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,256 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: authentifyd
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
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.9
|
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.9
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: devise
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.1.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.1.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: devise-encryptable
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: omniauth
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.1.4
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.1.4
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: omniauth-facebook
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.4.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.4.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: omniauth-twitter
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.0.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.0.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: omniauth-google-oauth2
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.2.1
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.2.1
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: haml-rails
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: localyzed
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.0.3.6
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.0.3.6
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: mysql2
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ! '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ! '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec-rails
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ! '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: Devise + Omniauth Authentication encapsulated in an Engine. Uses Devise.
|
168
|
+
Parts taken from perens-instant-user and sso-devise-omniauth-provider
|
169
|
+
email:
|
170
|
+
- nicolas.arbogast@gmail.com
|
171
|
+
executables: []
|
172
|
+
extensions: []
|
173
|
+
extra_rdoc_files: []
|
174
|
+
files:
|
175
|
+
- app/assets/images/authentifyd/en.png
|
176
|
+
- app/assets/images/authentifyd/facebook-logo.png
|
177
|
+
- app/assets/images/authentifyd/fr.png
|
178
|
+
- app/assets/images/authentifyd/google-logo.png
|
179
|
+
- app/assets/images/authentifyd/signin_with_facebook.png
|
180
|
+
- app/assets/images/authentifyd/signin_with_fb.png
|
181
|
+
- app/assets/images/authentifyd/signin_with_google.png
|
182
|
+
- app/assets/images/authentifyd/signin_with_twitter.png
|
183
|
+
- app/assets/images/authentifyd/twitter-logo.png
|
184
|
+
- app/assets/javascripts/authentifyd/application.js
|
185
|
+
- app/assets/stylesheets/authentifyd/application.css
|
186
|
+
- app/controllers/authentifyd/application_controller.rb
|
187
|
+
- app/controllers/authentifyd/authentications_controller.rb
|
188
|
+
- app/controllers/authentifyd/confirmations_controller.rb
|
189
|
+
- app/controllers/authentifyd/passwords_controller.rb
|
190
|
+
- app/controllers/authentifyd/registrations_controller.rb
|
191
|
+
- app/controllers/authentifyd/sessions_controller.rb
|
192
|
+
- app/controllers/authentifyd/unlocks_controller.rb
|
193
|
+
- app/helpers/authentifyd/application_helper.rb
|
194
|
+
- app/models/authentifyd/authentication.rb
|
195
|
+
- app/models/authentifyd/user.rb
|
196
|
+
- app/models/authentifyd.rb
|
197
|
+
- app/views/authentifyd/authentications/_authentication.html.erb
|
198
|
+
- app/views/authentifyd/authentications/index.html.erb
|
199
|
+
- app/views/authentifyd/authentications/link.html.erb
|
200
|
+
- app/views/authentifyd/confirmations/new.html.erb
|
201
|
+
- app/views/authentifyd/devise/mailer/confirmation_instructions.html.erb
|
202
|
+
- app/views/authentifyd/devise/mailer/reset_password_instructions.html.erb
|
203
|
+
- app/views/authentifyd/devise/mailer/unlock_instructions.html.erb
|
204
|
+
- app/views/authentifyd/devise/shared/_links.erb
|
205
|
+
- app/views/authentifyd/layouts/_account_menu.html.haml
|
206
|
+
- app/views/authentifyd/passwords/edit.html.erb
|
207
|
+
- app/views/authentifyd/passwords/new.html.erb
|
208
|
+
- app/views/authentifyd/registrations/_authentifyd_form.html.erb
|
209
|
+
- app/views/authentifyd/registrations/edit.html.erb
|
210
|
+
- app/views/authentifyd/registrations/new.html.erb
|
211
|
+
- app/views/authentifyd/sessions/_social_networks.html.erb
|
212
|
+
- app/views/authentifyd/sessions/new.html.erb
|
213
|
+
- app/views/authentifyd/unlocks/new.html.erb
|
214
|
+
- app/views/layouts/authentifyd/_navbar.html.haml
|
215
|
+
- app/views/layouts/authentifyd/application.html.erb
|
216
|
+
- config/initializers/devise.rb
|
217
|
+
- config/initializers/omniauth.rb
|
218
|
+
- config/locales/devise.en.yml
|
219
|
+
- config/locales/devise.fr.yml
|
220
|
+
- config/locales/en.yml
|
221
|
+
- config/locales/fr.yml
|
222
|
+
- config/routes.rb
|
223
|
+
- db/migrate/20121120091659_create_authentifyd_users.rb
|
224
|
+
- db/migrate/20121120091700_create_authentifyd_authentications.rb
|
225
|
+
- db/migrate/20130827085250_add_language_to_user.rb
|
226
|
+
- lib/authentifyd/engine.rb
|
227
|
+
- lib/authentifyd/version.rb
|
228
|
+
- lib/authentifyd.rb
|
229
|
+
- lib/tasks/authentifyd_tasks.rake
|
230
|
+
- MIT-LICENSE
|
231
|
+
- Rakefile
|
232
|
+
- README.rdoc
|
233
|
+
homepage: https://github.com/NicoArbogast/authentifyd.git
|
234
|
+
licenses: []
|
235
|
+
metadata: {}
|
236
|
+
post_install_message:
|
237
|
+
rdoc_options: []
|
238
|
+
require_paths:
|
239
|
+
- lib
|
240
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
241
|
+
requirements:
|
242
|
+
- - ! '>='
|
243
|
+
- !ruby/object:Gem::Version
|
244
|
+
version: '0'
|
245
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - ! '>='
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: '0'
|
250
|
+
requirements: []
|
251
|
+
rubyforge_project:
|
252
|
+
rubygems_version: 2.0.7
|
253
|
+
signing_key:
|
254
|
+
specification_version: 4
|
255
|
+
summary: Devise + Omniauth Authentication encapsulated in an Engine.
|
256
|
+
test_files: []
|