mumukit-login 1.2.2 → 1.2.3

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: c7a3225302ac1a479604fb8f7758c7de8d4b8801
4
- data.tar.gz: c1068eab0152e6db949343d14f4adf2ca0ed59cf
3
+ metadata.gz: 48edbda68d4cfe47010566b3e964b6ad9eb41f8b
4
+ data.tar.gz: 322308225595883d0ee68579b44a4aefc0e34207
5
5
  SHA512:
6
- metadata.gz: 8e8d6f2c1874c5488e39993039401b35eb6d1942cd8282a2c178a5f360cc796965c802ed2ade6175c099c3bf63545482e4c96de52bd49369fbf13284cf6c7a9a
7
- data.tar.gz: 4e9ab83a2a07da6d385c82e7e8cdc785c022d8a77f429e2393747fcf588686c2611fc684fa2558f8284497ea27d4aefd76da0bf6eaca37492601f26a080f890e
6
+ metadata.gz: 2f326f6ba810bbe35669cc22452ad83a2aa7d9001ddf9b174c8084ed562c1c99113a4386d0915cccd927f3d573b364b674eec3a5a1a87c022024532897d5846f
7
+ data.tar.gz: f26ae8bb3e654efc3909b46914ff9ad2bd3b44d4561afc12e34fe7c19c4cc7cc8c6753f9f18dd669e286226a60c549ae014bd5e7c2800c3e7d9d09d5fb9d7dfb
@@ -8,19 +8,11 @@ class Mumukit::Login::Provider::Auth0 < Mumukit::Login::Provider::Base
8
8
  end
9
9
 
10
10
  def request_authentication!(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
11
+ controller.render_html! auth0_script_html(controller, login_settings)
17
12
  end
18
13
 
19
14
  def header_html(*)
20
- <<HTML
21
- <script src="https://cdn.auth0.com/js/lock-7.12.min.js"></script>
22
- </script>
23
- HTML
15
+ ''
24
16
  end
25
17
 
26
18
  def footer_html(*)
@@ -38,4 +30,14 @@ HTML
38
30
  def lock_settings(controller, login_settings, options)
39
31
  login_settings.to_lock_json(controller.url_for(callback_path), options)
40
32
  end
33
+
34
+ def auth0_script_html(controller, login_settings)
35
+ settings = lock_settings(controller, login_settings, {closable: false})
36
+ <<HTML
37
+ <script src="https://cdn.auth0.com/js/lock-7.12.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
41
43
  end
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Login
3
- VERSION = '1.2.2'
3
+ VERSION = '1.2.3'
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: 1.2.2
4
+ version: 1.2.3
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-02-16 00:00:00.000000000 Z
11
+ date: 2017-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler