mumukit-login 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9015dbcdd88b757402f7d6429a74363a0f883dd6
4
- data.tar.gz: e130d28651798448884a115bdf26345f0d6467ca
3
+ metadata.gz: ae65819393359fb8300c35b76f98515040520133
4
+ data.tar.gz: 313ee8cdead5fb402714dc264ce0cfacf52e1467
5
5
  SHA512:
6
- metadata.gz: 95478cae35e16bdea4b0f9dce3ca24cc0a3f5c8920e1eeb6b1b829656a4243c77e70769dc2287e006531d6a6515c533a1bd6b34377721eef7f216590e58d81a2
7
- data.tar.gz: 028e87c32e7de9cbbebebb8d1ee7a96b4660f015ad28f071483a46404a6b289d1704832639bcd53c90428b60eff13610eb55ef58b5778027dd6201793eebe021
6
+ metadata.gz: a913d8cf5e120e031384188c21d3e8d75d1a9349af8c40402e1b57dba1e79fb4a5eff053699ecb6becb5fa2346502636d4c70190eccd0dc24b7e1dc2922185f8
7
+ data.tar.gz: 799d137c1cb904d3e92712bb4ab21db9e33ebc9857043f609a6b82cfd994360e4d3471264ac09e686426df6d79ca9e059e52b34d2ff72c961b0276de9c2c6f77
@@ -8,11 +8,19 @@ class Mumukit::Login::Provider::Auth0 < Mumukit::Login::Provider::Base
8
8
  end
9
9
 
10
10
  def request_authentication!(controller, login_settings)
11
- controller.render_html! auth0_script_html(controller, login_settings)
11
+ settings = lock_settings(controller, login_settings, {closable: false})
12
+ controller.render_html! <<HTML
13
+ <script type="text/javascript">
14
+ new Auth0Lock('#{auth0_config.client_id}', '#{auth0_config.domain}').show(#{settings});
15
+ </script>
16
+ HTML
12
17
  end
13
18
 
14
19
  def header_html(*)
15
- ''
20
+ <<HTML
21
+ <script src="https://cdn.auth0.com/js/lock/10.14.0/lock.min.js"></script>
22
+ </script>
23
+ HTML
16
24
  end
17
25
 
18
26
  def footer_html(*)
@@ -31,13 +39,4 @@ class Mumukit::Login::Provider::Auth0 < Mumukit::Login::Provider::Base
31
39
  login_settings.to_lock_json(controller.url_for(callback_path), options)
32
40
  end
33
41
 
34
- def auth0_script_html(controller, login_settings)
35
- settings = lock_settings(controller, login_settings, {closable: false})
36
- <<HTML
37
- <script src="http://cdn.auth0.com/js/lock/10.14.0/lock.min.js"></script>
38
- <script type="text/javascript">
39
- new Auth0Lock('#{auth0_config.client_id}', '#{auth0_config.domain}').show(#{settings});
40
- </script>
41
- HTML
42
- end
43
42
  end
@@ -1,4 +1,3 @@
1
-
2
1
  class Mumukit::Login::Settings
3
2
  LOCK_LOGIN_METHODS = {
4
3
  facebook: 'facebook',
@@ -35,11 +34,20 @@ class Mumukit::Login::Settings
35
34
  end
36
35
 
37
36
  def lock_json
38
- {dict: I18n.locale,
39
- connections: lock_login_methods,
40
- icon: '/logo-alt.png',
41
- socialBigButtons: !many_methods?,
42
- disableResetAction: false}
37
+ {
38
+ languageDictionary: {
39
+ title: 'Mumuki'
40
+ },
41
+ language: I18n.locale,
42
+ allowedConnections: lock_login_methods,
43
+ socialButtonStyle: many_methods? ? 'small' : 'big',
44
+ rememberLastLogin: true,
45
+ theme: {
46
+ logo: '/logo-alt.png',
47
+ primaryColor: '#FF5B81'
48
+ },
49
+ disableResetAction: false,
50
+ closable: false}
43
51
  end
44
52
 
45
53
  def lock_login_methods
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Login
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumukit-login
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-11 00:00:00.000000000 Z
11
+ date: 2017-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler