warden-browserid 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: dfc6b303d0bbeb34d07bab59fb60ff6fea2ce60e
4
+ data.tar.gz: d9adbb70a34bb0d69d1df139eba02c4d54feaf83
5
+ SHA512:
6
+ metadata.gz: 32d4b983d13892ca0f792c148fc706b75f472b37b544fa6b712a19ec61cd368f393ab43f570da156dca9f42bb91c9de71645a25c5519b524b7e61bcea4a94748
7
+ data.tar.gz: 010eb8bfb53ac16ebedd9aa3fe0bac7d558c5778241dc472626530e3d388e7d5674e36fe50ae47875064620caf4f3cb2bfaa247271c5121ed3d6f8ea8bbccaea
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
data/README.md CHANGED
@@ -26,20 +26,23 @@ config/initializers/devise.rb in Rails:
26
26
  manager.default_strategies(:scope => :user).unshift :browserid
27
27
  end
28
28
  ```
29
- See the [Warden wiki] for other usage. The following option is
30
- available, since [Mozilla] [1] says to use BrowserID as follows:
29
+
30
+ See the [Warden wiki] [1] for other usage. The following option is
31
+ available, since [Mozilla] [2] says to use BrowserID as follows:
32
+
31
33
  ```ruby
32
- # manager.browserid_url = "dev.diresworb.org" # Development
33
- (default)
34
- # manager.browserid_url = "diresworb.org" # Beta
35
- # manager.browserid_url = "browserid.org" # Production
34
+ manager.browserid_url = "dev.diresworb.org" # Development (default)
35
+ # manager.browserid_url = "diresworb.org" # Beta
36
+ # manager.browserid_url = "browserid.org" # Production
37
+
36
38
  ```
37
39
 
38
- I use the [devise-browserid] gem
40
+ I use the [devise-browserid] [3] gem
39
41
  to enable client side action for BrowserID.
40
42
 
41
43
  [1]: https://github.com/hassox/warden/wiki/Setup "Warden wiki"
42
- [2]: https://github.com/ringe/devise-browserid "devise-browserid"
44
+ [2]: https://developer.mozilla.org/en/BrowserID/Primary/Developer_tips "Mozilla"
45
+ [3]: https://github.com/ringe/devise-browserid "devise-browserid"
43
46
 
44
47
  ## Contributing
45
48
 
data/Rakefile CHANGED
@@ -1,2 +1,6 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
+
4
+ task :default do
5
+ puts "Thank you for using warden-browserid."
6
+ end
@@ -1,4 +1,9 @@
1
+ require 'warden'
1
2
  module Warden
3
+ # The browserid_url option can be one of the following:
4
+ # * dev.diresworb.org for development
5
+ # * diresworb.org for beta
6
+ # * browserid.org for production
2
7
  class Config < Hash
3
8
  hash_accessor :browserid_url
4
9
  end
@@ -1,4 +1,5 @@
1
1
  require 'net/https'
2
+ require 'warden'
2
3
 
3
4
  module Warden
4
5
  module BrowserId
@@ -21,13 +22,14 @@ module Warden
21
22
 
22
23
  json = JSON.parse response.body
23
24
  @asserted = json
25
+ puts @asserted
24
26
 
25
27
  # Return true if asserted email and audience is right
26
28
  json["status"] == "okay" and json["audience"] == request.host_with_port
27
29
  end
28
30
 
29
31
  # Authenticate user if email was verified
30
- def authenticate!
32
+ def authenticate!
31
33
  u = User.find_by_email(@asserted["email"])
32
34
  u.nil? ? fail!("The given email is not registered for this system.") : success!(u)
33
35
  end
@@ -1,5 +1,5 @@
1
1
  module Warden
2
2
  module BrowserId
3
- VERSION = "0.8.0"
3
+ VERSION = "0.8.1"
4
4
  end
5
5
  end
@@ -16,4 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Warden::BrowserId::VERSION
17
17
 
18
18
  gem.add_dependency "warden"
19
+ gem.add_dependency "rake"
19
20
  end
metadata CHANGED
@@ -1,27 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warden-browserid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
5
- prerelease:
4
+ version: 0.8.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - ringe
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-04-16 00:00:00.000000000Z
11
+ date: 2016-04-07 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: warden
16
- requirement: &9189640 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *9189640
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
25
41
  description: Warden BrowserID strategy
26
42
  email:
27
43
  - runar@rin.no
@@ -29,7 +45,8 @@ executables: []
29
45
  extensions: []
30
46
  extra_rdoc_files: []
31
47
  files:
32
- - .gitignore
48
+ - ".gitignore"
49
+ - ".travis.yml"
33
50
  - Gemfile
34
51
  - LICENSE
35
52
  - README.md
@@ -41,26 +58,25 @@ files:
41
58
  - warden-browserid.gemspec
42
59
  homepage: https://github.com/ringe/warden-browserid
43
60
  licenses: []
61
+ metadata: {}
44
62
  post_install_message:
45
63
  rdoc_options: []
46
64
  require_paths:
47
65
  - lib
48
66
  required_ruby_version: !ruby/object:Gem::Requirement
49
- none: false
50
67
  requirements:
51
- - - ! '>='
68
+ - - ">="
52
69
  - !ruby/object:Gem::Version
53
70
  version: '0'
54
71
  required_rubygems_version: !ruby/object:Gem::Requirement
55
- none: false
56
72
  requirements:
57
- - - ! '>='
73
+ - - ">="
58
74
  - !ruby/object:Gem::Version
59
75
  version: '0'
60
76
  requirements: []
61
77
  rubyforge_project:
62
- rubygems_version: 1.8.15
78
+ rubygems_version: 2.2.2
63
79
  signing_key:
64
- specification_version: 3
80
+ specification_version: 4
65
81
  summary: Authenticate your Warden-enabled app using BrowserID from Mozilla
66
82
  test_files: []