sinatra-g_auth 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -4
- data/lib/sinatra/g_auth.rb +2 -1
- data/lib/sinatra/g_auth/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69ebf570617931ac368317aae538d98e6c5edf51
|
4
|
+
data.tar.gz: e04ca1245a6cf9da8ec9a35e8368f21e1674dd21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 253886ec89fd233c21514786ae2e68426145ecc0ecbcfa6d006f12d4c0100ed0ef33ebd8558a63675f40a2e2b4e448fc929577f5313671a02d567ecfdedc7635
|
7
|
+
data.tar.gz: ca51b3cd299e7ebaf2a347f3b5a3dabaa73293521d78506af682a09fb644459bef0931baca82c752deabd295d8dd660e8d37be88ab93e1727434a20a043a8a2c
|
data/README.md
CHANGED
@@ -12,10 +12,6 @@ And then execute:
|
|
12
12
|
|
13
13
|
$ bundle
|
14
14
|
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install sinatra-g_auth
|
18
|
-
|
19
15
|
## Usage
|
20
16
|
|
21
17
|
Configure the settings and register the extension to get up and running.
|
@@ -26,6 +22,7 @@ class App < Sinatra::Base
|
|
26
22
|
set :gauth_domain, 'example.org' # set this to your google apps domain
|
27
23
|
set :gauth_tmp_dir, './tmp' # path to a directory that's writable by your web process
|
28
24
|
set :gauth_redirect, '/' # where to redirect users after they've authenticated
|
25
|
+
set :gauth_openid_store, OpenID::Store::Memcache.new(Dalli::Client.new) # Pass an instance of OpenID::Store, defaults to Filestore in gauth_tmp_dir
|
29
26
|
|
30
27
|
get '/protected' do
|
31
28
|
protect_with_gauth! # add this to any route you want protected
|
data/lib/sinatra/g_auth.rb
CHANGED
@@ -17,9 +17,10 @@ module Sinatra
|
|
17
17
|
app.set :gauth_domain, 'gmail.com'
|
18
18
|
app.set :gauth_redirect, '/'
|
19
19
|
app.set :gauth_tmp_dir, '/tmp'
|
20
|
+
app.set :gauth_openid_store, OpenID::Store::Filesystem.new(app.settings.gauth_tmp_dir)
|
20
21
|
|
21
22
|
app.use OmniAuth::Builder do
|
22
|
-
provider :google_apps, store:
|
23
|
+
provider :google_apps, store: app.settings.gauth_openid_store, name: 'g', domain: app.settings.gauth_domain
|
23
24
|
end
|
24
25
|
|
25
26
|
app.post '/auth/g/callback' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-g_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- StyleSeek Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.0.
|
149
|
+
rubygems_version: 2.0.5
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Quickly add Google Apps authentication to any Sintra app.
|