omniauth-vatsim 0.1.3 → 0.1.4
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 +4 -4
- data/README.md +39 -3
- data/lib/omniauth-vatsim/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0943329ada51e794c3615f38f285e87c0ad6fcf8'
|
4
|
+
data.tar.gz: babd1b7a24c3f9145a781852bc82682fecb3109a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f269767575c2bed24fcf5681cca9306f9acedddaa44576a7337615fc2a1eb8388ca282f3faaed204d13b6fb8f22213d5eb84ac295f1fe16a444da15cba5176a8
|
7
|
+
data.tar.gz: 375ead456bba89e1584717a60cc289d8ec7f64e145ab18d447e8ead8aa91a2bfb0dce4da7932452f456db4ec7f51494a12c07b9950fa6060eea0b5b958c36e67
|
data/README.md
CHANGED
@@ -3,8 +3,6 @@
|
|
3
3
|
OmniAuth::Strategies::Vatsim is an OmniAuth strategy for authenticating with
|
4
4
|
the VATSIM SSO with OAuth1.
|
5
5
|
|
6
|
-
Note: Currently only supports HMAC-SHA1 authentication
|
7
|
-
|
8
6
|
## Installation
|
9
7
|
|
10
8
|
Add this line to your application's Gemfile:
|
@@ -35,7 +33,45 @@ Or you can pull it directly from github:
|
|
35
33
|
gem 'omniauth-vatsim', git: 'https://github.com/jvoss/omniauth-vatsim.git'
|
36
34
|
```
|
37
35
|
|
38
|
-
|
36
|
+
### RSA-SHA1 (Recommended)
|
37
|
+
|
38
|
+
For a Rails application, create an initializer ```config/initializers/omniauth.rb```:
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
42
|
+
provider :vatsim, 'app_id', nil,
|
43
|
+
site: 'https://cert.vatsim.net/sso',
|
44
|
+
signature_method: 'RSA-SHA1',
|
45
|
+
private_key: OpenSSL::PKey::RSA.new(IO.read('<PRIVATE KEY FILENAME>'), ENV['key_passphrase'])
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
For a Rails application using [Devise](https://github.com/plataformatec/devise), modify ```config/initializers/devise.rb```:
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
config.omniauth :vatsim, 'app_id', nil,
|
53
|
+
client_options: {
|
54
|
+
site: 'https://cert.vatsim.net/sso',
|
55
|
+
signature_method: 'RSA-SHA1',
|
56
|
+
private_key: OpenSSL::PKey::RSA.new(IO.read('<PRIVATE KEY FILENAME>'), ENV['key_passphrase'])
|
57
|
+
}
|
58
|
+
```
|
59
|
+
|
60
|
+
For Sinatra you would add:
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
use Rack::Session::Cookie
|
64
|
+
use OmniAuth::Builder do
|
65
|
+
provider :vatsim, 'api_id', nil,
|
66
|
+
site: 'https://cert.vatsim.net/sso'
|
67
|
+
signature_method: 'RSA-SHA1',
|
68
|
+
private_key: OpenSSL::PKey::RSA.new(IO.read('<PRIVATE KEY FILENAME>'), ENV['key_passphrase'])
|
69
|
+
end
|
70
|
+
```
|
71
|
+
|
72
|
+
### HMAC-SHA1
|
73
|
+
|
74
|
+
For a Rails application, create an initializer ```config/initializers/omniauth.rb```:
|
39
75
|
|
40
76
|
```ruby
|
41
77
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-vatsim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan P. Voss
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.6.8
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: OmniAuth strategy for VATSIM OAuth/SSO
|