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 +4 -4
- data/lib/mumukit/login/provider/auth0.rb +10 -11
- data/lib/mumukit/login/settings.rb +14 -6
- data/lib/mumukit/login/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae65819393359fb8300c35b76f98515040520133
|
4
|
+
data.tar.gz: 313ee8cdead5fb402714dc264ce0cfacf52e1467
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
{
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|
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.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
|
+
date: 2017-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|