mumukit-login 2.0.2 → 2.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c492a7ab4a7c1a61cb22be1a8578dbea44c7cb6a
|
4
|
+
data.tar.gz: 72709766299442d058f90571ccbf77724476417b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7c018fdff599d52b6a4a1ea33315416de557621b20484657f337603f3df82bdc3985ac8d752cf685a919b4fcf26b9e6255d4616202682ecdd8502fe132c5e80
|
7
|
+
data.tar.gz: 08dd0e4d9565e5a1f42f7eb25948169b960e02f043b1737c4ef2de5908eadd170a2b3d260f721afc6584517878d8a3fb2ab5759451f29badd4a1939f73e76347
|
@@ -25,8 +25,8 @@ module Mumukit::Login::Framework::Rails
|
|
25
25
|
rails_controller.redirect_to path
|
26
26
|
end
|
27
27
|
|
28
|
-
def self.render_html!(
|
29
|
-
rails_controller.render html:
|
28
|
+
def self.render_html!(html, rails_controller)
|
29
|
+
rails_controller.render html: html[:body].html_safe, layout: true
|
30
30
|
end
|
31
31
|
|
32
32
|
# Configures the login routes.
|
@@ -19,8 +19,13 @@ module Mumukit::Login::Framework::Sinatra
|
|
19
19
|
sinatra_handler.redirect path
|
20
20
|
end
|
21
21
|
|
22
|
-
def self.render_html!(
|
23
|
-
|
22
|
+
def self.render_html!(html, sinatra_handler)
|
23
|
+
<<HTML
|
24
|
+
<html>
|
25
|
+
<head>#{html[:header]}</head>
|
26
|
+
<body>#{html[:body]}</body>
|
27
|
+
</html>
|
28
|
+
HTML
|
24
29
|
end
|
25
30
|
|
26
31
|
def self.configure_login_routes!(sinatra_module)
|
@@ -9,11 +9,8 @@ class Mumukit::Login::Provider::Auth0 < Mumukit::Login::Provider::Base
|
|
9
9
|
|
10
10
|
def request_authentication!(controller, login_settings)
|
11
11
|
settings = lock_settings(controller, login_settings, {closable: false})
|
12
|
-
controller.render_html!
|
13
|
-
|
14
|
-
new Auth0Lock('#{auth0_config.client_id}', '#{auth0_config.domain}', JSON.parse('#{settings}')).show();
|
15
|
-
</script>
|
16
|
-
HTML
|
12
|
+
controller.render_html! header: header_html,
|
13
|
+
body: script_html(settings)
|
17
14
|
end
|
18
15
|
|
19
16
|
def header_html(*)
|
@@ -23,6 +20,14 @@ HTML
|
|
23
20
|
HTML
|
24
21
|
end
|
25
22
|
|
23
|
+
def script_html(settings)
|
24
|
+
<<HTML
|
25
|
+
<script type="text/javascript">
|
26
|
+
new Auth0Lock('#{auth0_config.client_id}', '#{auth0_config.domain}', JSON.parse('#{settings}')).show();
|
27
|
+
</script>
|
28
|
+
HTML
|
29
|
+
end
|
30
|
+
|
26
31
|
def footer_html(*)
|
27
32
|
'<a href="https://auth0.com/" target="_blank">
|
28
33
|
<img height="40" alt="JWT Auth for open source projects" src="//cdn.auth0.com/oss/badges/a0-badge-light.png"/>
|
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.
|
4
|
+
version: 2.0.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-04-
|
11
|
+
date: 2017-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|