sinatra-portier 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/lib/sinatra/browserid/template.rb +1 -1
- data/lib/sinatra/browserid.rb +1 -0
- 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: fbc4d5679b36bfe8c83d6657e0835d7b4747f76b
|
4
|
+
data.tar.gz: bbe2ce4265fc758c9206f4e7986876e2477f72a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdc7a80021f5577be656d395f0a809e4f9e3e7b937545e295ec4e5cf98a881701266e0d504395855ae77815047ca0b53aea09d511ab22b921ffef3bf320f4352
|
7
|
+
data.tar.gz: a55f87fec6301cc3d3fa1727bd66d3b2d96a062c7a7190082fe640c7352f2f6547b66b0481d91f945bd74a9332b106913c85800b1dc777385ec0683d7f3a2b94
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Note that logins are not done from within a form on your site -- you provide a l
|
|
10
10
|
|
11
11
|
## How to get started
|
12
12
|
|
13
|
-
Install the gem **sinatra-portier
|
13
|
+
Install the gem **sinatra-portier**:
|
14
14
|
|
15
15
|
```
|
16
16
|
gem install sinatra-portier
|
@@ -27,7 +27,7 @@ require 'sinatra/browserid'
|
|
27
27
|
register Sinatra::BrowserID
|
28
28
|
|
29
29
|
set :sessions, true
|
30
|
-
# Disabling origin-
|
30
|
+
# Disabling origin-check is needed to make webkit-browsers like Chrome work.
|
31
31
|
# Behind a proxy you will also need to disable :remote_token, regardless for which browser.
|
32
32
|
set :protection, except: [:http_origin]
|
33
33
|
get '/' do
|
@@ -60,5 +60,6 @@ Available sinatra settings:
|
|
60
60
|
* <tt>:browserid_url</tt>: If you're using an alternate auth provider
|
61
61
|
other than https://broker.portier.io
|
62
62
|
* <tt>:browserid_login_url</tt>: URL users get redirected to when the
|
63
|
-
<tt>authorize
|
64
|
-
* <tt>:browserid_button_class</tt
|
63
|
+
<tt>authorize!(redirect: nil)</tt> helper is called and a user is not logged in. `redirect` is an optional parameter to set the redirect target on the function call instead.
|
64
|
+
* <tt>:browserid_button_class</tt>: Css class of the login button
|
65
|
+
* <tt>:browserid_button_text</tt>: Text of the login button
|
@@ -10,7 +10,7 @@ module Sinatra
|
|
10
10
|
<input type=hidden name=client_id value="<%= request.base_url.chomp('/') %>" />
|
11
11
|
<input type=hidden name=redirect_uri value="<%= url '/_browserid_assert' %>" />
|
12
12
|
<input type=hidden name=nonce value="<%= nonce %>" />
|
13
|
-
<input type=submit value="
|
13
|
+
<input type=submit value="<%= settings.browserid_button_text %>" class="<%= settings.browserid_button_class %>" />
|
14
14
|
</form>
|
15
15
|
EOF
|
16
16
|
end
|
data/lib/sinatra/browserid.rb
CHANGED
@@ -19,6 +19,7 @@ module Sinatra
|
|
19
19
|
app.set :browserid_login_button, :red
|
20
20
|
app.set :browserid_login_url, "/_browserid_login"
|
21
21
|
app.set :browserid_button_class, ""
|
22
|
+
app.set :browserid_button_text, "Log in"
|
22
23
|
|
23
24
|
app.get '/_browserid_login' do
|
24
25
|
# TODO(petef): render a page that initiates login without
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-portier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Fritchman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-09-
|
12
|
+
date: 2017-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|