authentifyd 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +26 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/images/authentifyd/en.png +0 -0
  6. data/app/assets/images/authentifyd/facebook-logo.png +0 -0
  7. data/app/assets/images/authentifyd/fr.png +0 -0
  8. data/app/assets/images/authentifyd/google-logo.png +0 -0
  9. data/app/assets/images/authentifyd/signin_with_facebook.png +0 -0
  10. data/app/assets/images/authentifyd/signin_with_fb.png +0 -0
  11. data/app/assets/images/authentifyd/signin_with_google.png +0 -0
  12. data/app/assets/images/authentifyd/signin_with_twitter.png +0 -0
  13. data/app/assets/images/authentifyd/twitter-logo.png +0 -0
  14. data/app/assets/javascripts/authentifyd/application.js +15 -0
  15. data/app/assets/stylesheets/authentifyd/application.css +13 -0
  16. data/app/controllers/authentifyd/application_controller.rb +11 -0
  17. data/app/controllers/authentifyd/authentications_controller.rb +94 -0
  18. data/app/controllers/authentifyd/confirmations_controller.rb +5 -0
  19. data/app/controllers/authentifyd/passwords_controller.rb +4 -0
  20. data/app/controllers/authentifyd/registrations_controller.rb +42 -0
  21. data/app/controllers/authentifyd/sessions_controller.rb +13 -0
  22. data/app/controllers/authentifyd/unlocks_controller.rb +4 -0
  23. data/app/helpers/authentifyd/application_helper.rb +4 -0
  24. data/app/models/authentifyd.rb +5 -0
  25. data/app/models/authentifyd/authentication.rb +16 -0
  26. data/app/models/authentifyd/user.rb +66 -0
  27. data/app/views/authentifyd/authentications/_authentication.html.erb +15 -0
  28. data/app/views/authentifyd/authentications/index.html.erb +14 -0
  29. data/app/views/authentifyd/authentications/link.html.erb +14 -0
  30. data/app/views/authentifyd/confirmations/new.html.erb +25 -0
  31. data/app/views/authentifyd/devise/mailer/confirmation_instructions.html.erb +5 -0
  32. data/app/views/authentifyd/devise/mailer/reset_password_instructions.html.erb +8 -0
  33. data/app/views/authentifyd/devise/mailer/unlock_instructions.html.erb +7 -0
  34. data/app/views/authentifyd/devise/shared/_links.erb +30 -0
  35. data/app/views/authentifyd/layouts/_account_menu.html.haml +24 -0
  36. data/app/views/authentifyd/passwords/edit.html.erb +30 -0
  37. data/app/views/authentifyd/passwords/new.html.erb +27 -0
  38. data/app/views/authentifyd/registrations/_authentifyd_form.html.erb +52 -0
  39. data/app/views/authentifyd/registrations/edit.html.erb +1 -0
  40. data/app/views/authentifyd/registrations/new.html.erb +44 -0
  41. data/app/views/authentifyd/sessions/_social_networks.html.erb +23 -0
  42. data/app/views/authentifyd/sessions/new.html.erb +49 -0
  43. data/app/views/authentifyd/unlocks/new.html.erb +28 -0
  44. data/app/views/layouts/authentifyd/_navbar.html.haml +41 -0
  45. data/app/views/layouts/authentifyd/application.html.erb +19 -0
  46. data/config/initializers/devise.rb +3 -0
  47. data/config/initializers/omniauth.rb +119 -0
  48. data/config/locales/devise.en.yml +100 -0
  49. data/config/locales/devise.fr.yml +113 -0
  50. data/config/locales/en.yml +7 -0
  51. data/config/locales/fr.yml +7 -0
  52. data/config/routes.rb +30 -0
  53. data/db/migrate/20121120091659_create_authentifyd_users.rb +52 -0
  54. data/db/migrate/20121120091700_create_authentifyd_authentications.rb +11 -0
  55. data/db/migrate/20130827085250_add_language_to_user.rb +5 -0
  56. data/lib/authentifyd.rb +39 -0
  57. data/lib/authentifyd/engine.rb +16 -0
  58. data/lib/authentifyd/version.rb +3 -0
  59. data/lib/tasks/authentifyd_tasks.rake +4 -0
  60. metadata +256 -0
@@ -0,0 +1,11 @@
1
+ class CreateAuthentifydAuthentications < ActiveRecord::Migration
2
+ def change
3
+ create_table :authentifyd_authentications do |t|
4
+ t.integer :user_id
5
+ t.string :provider
6
+ t.string :uid
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class AddLanguageToUser < ActiveRecord::Migration
2
+ def change
3
+ add_column :authentifyd_users, :language, :string
4
+ end
5
+ end
@@ -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
@@ -0,0 +1,3 @@
1
+ module Authentifyd
2
+ VERSION = "0.0.5"
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :authentifyd do
3
+ # # Task goes here
4
+ # 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: []