sinatra_warden 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.9
1
+ 0.2.0
@@ -39,6 +39,9 @@ module Sinatra
39
39
  def self.registered(app)
40
40
  app.helpers Warden::Helpers
41
41
 
42
+ # Enable Sessions
43
+ app.set :sessions, true
44
+
42
45
  app.set :auth_failure_path, '/'
43
46
  app.set :auth_success_path, lambda { back }
44
47
 
@@ -49,7 +52,6 @@ module Sinatra
49
52
 
50
53
  # OAuth Specific Settings
51
54
  app.set :auth_use_oauth, false
52
- app.set :auth_oauth_authorize_url, nil
53
55
 
54
56
  app.post '/unauthenticated/?' do
55
57
  status 401
@@ -58,8 +60,10 @@ module Sinatra
58
60
  end
59
61
 
60
62
  app.get '/login/?' do
61
- if options.auth_use_oauth && !options.auth_oauth_authorize_url.nil?
62
- redirect options.auth_oauth_authorize_url
63
+ if options.auth_use_oauth && !@auth_oauth_request_token.nil?
64
+ session[:request_token] = @auth_oauth_request_token.token
65
+ session[:request_token_secret] = @auth_oauth_request_token.secret
66
+ redirect @auth_oauth_request_token.authorize_url
63
67
  else
64
68
  options.auth_use_erb ? erb(options.auth_login_template) : haml(options.auth_login_template)
65
69
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sinatra_warden}
8
- s.version = "0.1.9"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Smestad", "Daniel Neighman"]
12
- s.date = %q{2009-12-16}
12
+ s.date = %q{2009-12-18}
13
13
  s.description = %q{basic helpers and authentication methods for using warden with sinatra also providing some hooks into Rack::Flash}
14
14
  s.email = %q{justin.smestad@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra_warden
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Smestad
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-12-16 00:00:00 -07:00
13
+ date: 2009-12-18 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency