omniauth-webmaker 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +1 -0
- data/Gemfile +17 -0
- data/Guardfile +10 -0
- data/README.md +39 -0
- data/Rakefile +8 -0
- data/lib/omniauth-webmaker.rb +4 -0
- data/lib/omniauth/strategies/webmaker.rb +33 -0
- data/lib/omniauth/webmaker/version.rb +5 -0
- data/omniauth-webmaker.gemspec +25 -0
- data/spec/omniauth/spec_helper.rb +12 -0
- data/spec/omniauth/strategies/webmaker_spec.rb +5 -0
- metadata +141 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ba6487434c1d13af315ef69ab93eb2ce4a94f49a
|
4
|
+
data.tar.gz: d37b69388ded97113fee39af2b6ab946300cb409
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b44d58b99f53c5b00fb18e1e1a9895ecea1c2ccf302bac70bcc8dbb5435869939e19882be79c1f3b6c51b73f2ac1c39a6ed16b4c3e46510ef025c7a9eb5b43c7
|
7
|
+
data.tar.gz: 4d6a2cd1c73ce06c4afacf49828364cf3af0cbdc93ab5c4d0fbe45c77d114b1c76117a392dfdc6c7d54ebc53bd497f2fd008a0b332a7a352ed4b243cdaa1d87c
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/Gemfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in omniauth-webmaker.gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
group :development, :test do
|
7
|
+
gem 'rspec'
|
8
|
+
gem 'rack-test', require: 'rack/test'
|
9
|
+
|
10
|
+
gem 'guard'
|
11
|
+
gem 'guard-rspec'
|
12
|
+
gem 'guard-bundler'
|
13
|
+
gem 'pry'
|
14
|
+
|
15
|
+
gem 'rb-fsevent'
|
16
|
+
gem 'growl'
|
17
|
+
end
|
data/Guardfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# OmniAuth Webmaker
|
2
|
+
|
3
|
+
An OmniAuth Strategy for logging in via webmaker's login server.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
gem install omniauth-webmaker
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
TODO
|
12
|
+
|
13
|
+
### Basic Case
|
14
|
+
|
15
|
+
TODO
|
16
|
+
|
17
|
+
### Better Integration
|
18
|
+
|
19
|
+
TODO
|
20
|
+
|
21
|
+
## Options
|
22
|
+
|
23
|
+
These are the options you can specify that are relevant to Omniauth Webmaker:
|
24
|
+
|
25
|
+
* `:login_server_url` - The URL the login server resides at, including basic auth credentials and path to authenticate route (defaults to `http://testuser:password@localhost:3000/api/user/authenticate`)
|
26
|
+
* `:name` - The URL at which the strategy will be available (defaults to `webmaker`)
|
27
|
+
* `:audience_url` - The host of your site. Defaults to the `full_host` of OmniAuth (either automatically determined or determined by the `OmniAuth.config.full_host` option)
|
28
|
+
|
29
|
+
## License
|
30
|
+
|
31
|
+
Copyright (c) 2014 Christopher De Cairos
|
32
|
+
|
33
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
34
|
+
|
35
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
36
|
+
|
37
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
38
|
+
|
39
|
+
### Based on [omniauth-browserid](https://github.com/intridea/omniauth-browserid)
|
data/Rakefile
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require "omniauth"
|
2
|
+
require "omniauth-webmaker"
|
3
|
+
require "faraday"
|
4
|
+
require "multi_json"
|
5
|
+
|
6
|
+
module OmniAuth
|
7
|
+
module Strategies
|
8
|
+
class Webmaker
|
9
|
+
include OmniAuth::Strategy
|
10
|
+
|
11
|
+
option :login_server_url, "http://localhost:3000/api/user/authenticate"
|
12
|
+
option :name, "webmaker"
|
13
|
+
option :client_options, {}
|
14
|
+
|
15
|
+
info do
|
16
|
+
{
|
17
|
+
:email => verify_webmaker['user']['email']
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
def verify_webmaker
|
22
|
+
req_body = MultiJson.decode request.body
|
23
|
+
conn = Faraday.new( options[:client_options].update(:url => options["login_server_url"]) )
|
24
|
+
response = conn.post( '',
|
25
|
+
:assertion => req_body["assertion"],
|
26
|
+
:audience => req_body["audience"]
|
27
|
+
)
|
28
|
+
|
29
|
+
resp = MultiJson.decode(response.body)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/omniauth/webmaker/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Christopher De Cairos"]
|
6
|
+
gem.email = ["cade@mozillafoundation.org"]
|
7
|
+
gem.description = %q{An OmniAuth strategy for implementing webmaker login}
|
8
|
+
gem.summary = %q{An OmniAuth strategy for implementing webmaker-login}
|
9
|
+
gem.homepage = "https://github.com/cadecairos/omniauth-webmaker"
|
10
|
+
|
11
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
gem.name = "omniauth-webmaker"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = OmniAuth::Webmaker::VERSION
|
17
|
+
|
18
|
+
gem.add_dependency "omniauth", "~> 1.0"
|
19
|
+
gem.add_dependency "faraday", "~> 0.9"
|
20
|
+
gem.add_dependency "multi_json", "~> 1.9"
|
21
|
+
|
22
|
+
gem.add_development_dependency "rake", "~> 10.1"
|
23
|
+
gem.add_development_dependency "rspec", "~> 2.7"
|
24
|
+
gem.add_development_dependency "rack-test", "~> 0.6"
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-webmaker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Christopher De Cairos
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: omniauth
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.9'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.9'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: multi_json
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.9'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.9'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.1'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.7'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.7'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rack-test
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.6'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.6'
|
97
|
+
description: An OmniAuth strategy for implementing webmaker login
|
98
|
+
email:
|
99
|
+
- cade@mozillafoundation.org
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- .gitignore
|
105
|
+
- .rspec
|
106
|
+
- Gemfile
|
107
|
+
- Guardfile
|
108
|
+
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- lib/omniauth-webmaker.rb
|
111
|
+
- lib/omniauth/strategies/webmaker.rb
|
112
|
+
- lib/omniauth/webmaker/version.rb
|
113
|
+
- omniauth-webmaker.gemspec
|
114
|
+
- spec/omniauth/spec_helper.rb
|
115
|
+
- spec/omniauth/strategies/webmaker_spec.rb
|
116
|
+
homepage: https://github.com/cadecairos/omniauth-webmaker
|
117
|
+
licenses: []
|
118
|
+
metadata: {}
|
119
|
+
post_install_message:
|
120
|
+
rdoc_options: []
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
requirements: []
|
134
|
+
rubyforge_project:
|
135
|
+
rubygems_version: 2.2.2
|
136
|
+
signing_key:
|
137
|
+
specification_version: 4
|
138
|
+
summary: An OmniAuth strategy for implementing webmaker-login
|
139
|
+
test_files:
|
140
|
+
- spec/omniauth/spec_helper.rb
|
141
|
+
- spec/omniauth/strategies/webmaker_spec.rb
|