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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11b4a0beac50603b529b55bdf3e0e5de1d9db35e
4
- data.tar.gz: 9a6996eeac39dd4893eacd0f8d6d6e20b464a3ac
3
+ metadata.gz: 69ebf570617931ac368317aae538d98e6c5edf51
4
+ data.tar.gz: e04ca1245a6cf9da8ec9a35e8368f21e1674dd21
5
5
  SHA512:
6
- metadata.gz: 65019c0711bbb2335482b4e22bdabd1c8cdf47d2347e5f82d286fd1a85a36a5c539c48155a7904afef510d993e0106ef46a7906ace9c1936d4356599a271712c
7
- data.tar.gz: b6a8168b8755a031e824929799680b82c7b524f7817764075673a7fab0bf2444126a02d9a4e92312eb8df4748257fb74af877b879767d2f4b7f45a39791e058e
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
@@ -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: OpenID::Store::Filesystem.new(app.settings.gauth_tmp_dir), name: 'g', domain: app.settings.gauth_domain
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
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module GAuth
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
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
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-07-08 00:00:00.000000000 Z
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.2
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.