omniauth-rpi 1.1.0
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/.github/PULL_REQUEST_TEMPLATE.md +18 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.rubocop.yml +75 -0
- data/.tool-versions +1 -0
- data/.travis.yml +5 -0
- data/CHANGELOG.md +10 -0
- data/Gemfile +6 -0
- data/LICENCE.md +21 -0
- data/README.md +87 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/omniauth/strategies/hydra0.rb +79 -0
- data/lib/omniauth/strategies/hydra1.rb +75 -0
- data/lib/omniauth/strategies/rpi.rb +12 -0
- data/lib/omniauth-rpi/version.rb +5 -0
- data/lib/omniauth-rpi.rb +5 -0
- data/lib/rpi_auth_bypass.rb +63 -0
- data/omniauth-rpi.gemspec +33 -0
- metadata +190 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6c5b02d8e9d7d9c3c2cfd05e4101beb1cf020f4179fd60df438158e28e4b55fd
|
4
|
+
data.tar.gz: a900c630e232d93a8a9285215020dd9f11455d7c53e03d0682eefd59079cc588
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 11e427ee349802267163fb769c6359f1229e31fc3478fe279d2b3cd6bb372d25ef739b5b0788aae0743e518f9f5358d9655addac56e8c60b2342b66da193abd5
|
7
|
+
data.tar.gz: 7a00f600a2b83a4cd90dcd6d3424d53412ce8422d480cd49dfecb62a6d99946d832bb47b3be31afdca14379f5307fa7764640c5b77562def9cc61ff19ebe623b
|
@@ -0,0 +1,18 @@
|
|
1
|
+
## Status
|
2
|
+
|
3
|
+
- Closes _add issue numbers or delete_
|
4
|
+
- Related to _add issue numbers or delete_
|
5
|
+
|
6
|
+
## Points for consideration:
|
7
|
+
|
8
|
+
- Security
|
9
|
+
- Performance
|
10
|
+
- Has Changelog been updated?
|
11
|
+
|
12
|
+
## What's changed?
|
13
|
+
|
14
|
+
_Description of what's been done - bullets are usually best, but you do you._
|
15
|
+
|
16
|
+
## Steps to perform after merge
|
17
|
+
|
18
|
+
_Does a new version of the gem needs to be tagged and released?_
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
require: rubocop-rspec
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
Exclude:
|
5
|
+
- 'Gemfile'
|
6
|
+
- 'vendor/**/*'
|
7
|
+
- 'spec/fixtures/**/*'
|
8
|
+
- 'tmp/**/*'
|
9
|
+
- 'db/schema.rb'
|
10
|
+
- 'db/migrations/**/*'
|
11
|
+
- 'db/seeds/**/*'
|
12
|
+
- 'bin/**/*'
|
13
|
+
TargetRubyVersion: 2.3
|
14
|
+
|
15
|
+
Documentation:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Metrics/BlockLength:
|
19
|
+
Exclude:
|
20
|
+
- 'spec/**/*'
|
21
|
+
- 'config/routes.rb'
|
22
|
+
|
23
|
+
Metrics/LineLength:
|
24
|
+
Max: 120
|
25
|
+
|
26
|
+
Metrics/MethodLength:
|
27
|
+
Max: 15
|
28
|
+
|
29
|
+
Rails:
|
30
|
+
Enabled: true
|
31
|
+
|
32
|
+
Style/ClassAndModuleChildren:
|
33
|
+
EnforcedStyle: compact
|
34
|
+
|
35
|
+
Style/AlignHash:
|
36
|
+
EnforcedHashRocketStyle: table
|
37
|
+
EnforcedColonStyle: table
|
38
|
+
|
39
|
+
Style/BracesAroundHashParameters:
|
40
|
+
EnforcedStyle: context_dependent
|
41
|
+
|
42
|
+
Style/FrozenStringLiteralComment:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Style/HashSyntax:
|
46
|
+
EnforcedStyle: hash_rockets
|
47
|
+
|
48
|
+
Style/IndentHash:
|
49
|
+
EnforcedStyle: consistent
|
50
|
+
|
51
|
+
Style/SymbolProc:
|
52
|
+
Enabled: true
|
53
|
+
|
54
|
+
Style/TrailingCommaInArguments:
|
55
|
+
EnforcedStyleForMultiline: comma
|
56
|
+
|
57
|
+
Style/TrailingCommaInLiteral:
|
58
|
+
EnforcedStyleForMultiline: comma
|
59
|
+
|
60
|
+
RSpec/HookArgument:
|
61
|
+
EnforcedStyle: each
|
62
|
+
|
63
|
+
RSpec/NestedGroups:
|
64
|
+
Enabled: false
|
65
|
+
|
66
|
+
RSpec/ExampleLength:
|
67
|
+
Max: 15
|
68
|
+
|
69
|
+
RSpec/ExpectActual:
|
70
|
+
Exclude:
|
71
|
+
- 'spec/routing/**/*'
|
72
|
+
|
73
|
+
RSpec/InstanceVariable:
|
74
|
+
Exclude:
|
75
|
+
- 'spec/views/**/*'
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 2.7.2
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [1.1.0] - 2021-09-10
|
8
|
+
### Added
|
9
|
+
- Changelog in preparation for publishing app to rubygems.org
|
10
|
+
- Omniauth strategy for authenticating via RPI Hydra V1 endpoints
|
data/Gemfile
ADDED
data/LICENCE.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 Raspberry Pi Foundation
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
# OmniAuth Raspberry Pi
|
2
|
+
|
3
|
+
This is the official OmniAuth strategy for authenticating to Raspberry pi.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'omniauth-rpi', '~> 1.1.0'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
## Basic Usage
|
18
|
+
|
19
|
+
- [Integrating with OmniAuth](https://github.com/omniauth/omniauth/wiki)
|
20
|
+
- [Integrating with Devise](https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview)
|
21
|
+
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
use OmniAuth::Builder do
|
25
|
+
provider OmniAuth::Strategies::Hydra1, ENV['RASPBERRY_KEY'], ENV['RASPBERRY_SECRET']
|
26
|
+
end
|
27
|
+
```
|
28
|
+
|
29
|
+
## Use in development
|
30
|
+
|
31
|
+
In development it is sometimes useful to point at a staging/local version of the authentication
|
32
|
+
server (ie Hydra).
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
use OmniAuth::Builder do
|
36
|
+
provider OmniAuth::Strategies::Hydra1, ENV['RASPBERRY_KEY'], ENV['RASPBERRY_SECRET'],
|
37
|
+
:scope => 'openid email profile',
|
38
|
+
:client_options => {
|
39
|
+
:site => 'http://localhost:9000',
|
40
|
+
:authorize_url => 'http://localhost:9000/oauth2/auth',
|
41
|
+
:token_url => 'http://localhost:9000/oauth2/token'
|
42
|
+
}
|
43
|
+
)
|
44
|
+
```
|
45
|
+
|
46
|
+
## Bypassing OmniAuth/OAuth
|
47
|
+
|
48
|
+
It is also possible to bypass OmniAuth (and OAuth) **entirely**, which can be useful in circumstances where hostnames are dynamic, e.g. in review deployments. To do this add the following code to your OmniAuth initializer.
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
# We've usually used an environment variable set outside the app to trigger the
|
52
|
+
# auth bypass.
|
53
|
+
if ENV.has_key? 'BYPASS_OAUTH'
|
54
|
+
using RpiAuthBypass
|
55
|
+
OmniAuth.config.enable_rpi_auth_bypass
|
56
|
+
end
|
57
|
+
```
|
58
|
+
|
59
|
+
This will log you in with the following details:
|
60
|
+
* uid: `b6301f34-b970-4d4f-8314-f877bad8b150`
|
61
|
+
* email: `web@raspberrypi.org`
|
62
|
+
* name: `Web Team`
|
63
|
+
* nickname: `Web`
|
64
|
+
|
65
|
+
If you wish to specify your user's details, you can add the info manually with the following method call.
|
66
|
+
```
|
67
|
+
OmniAuth.config.add_rpi_mock(uid: '1234', info: {name: 'Example', nickname: 'Ex', email: 'ex@example.com' } )
|
68
|
+
```
|
69
|
+
|
70
|
+
All this could also be done inside the `OmniAuth::Builder` block too.
|
71
|
+
|
72
|
+
```ruby
|
73
|
+
using RpiAuthBypass
|
74
|
+
|
75
|
+
use OmniAuth::Builder do
|
76
|
+
configure do |c|
|
77
|
+
if ENV.has_key? 'BYPASS_OAUTH'
|
78
|
+
c.enable_rpi_auth_bypass
|
79
|
+
c.add_rpi_mock(uid: 'foo', info: {name: ... } )
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
```
|
84
|
+
|
85
|
+
## Publishing changes
|
86
|
+
|
87
|
+
When publishing changes to the provider, don't forget to bump the version number in `lib/omniauth-rpi/version.rb`
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "omniauth_rpi"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
require 'jwt'
|
3
|
+
|
4
|
+
module OmniAuth::Strategies
|
5
|
+
class Hydra0 < OmniAuth::Strategies::OAuth2
|
6
|
+
option :client_options,
|
7
|
+
:site => 'https://auth.raspberrypi.org',
|
8
|
+
:authorize_url => 'https://auth.raspberrypi.org/oauth2/auth',
|
9
|
+
:token_url => 'https://auth.raspberrypi.org/oauth2/token'
|
10
|
+
|
11
|
+
def authorize_params
|
12
|
+
super.tap do |params|
|
13
|
+
%w[scope client_options].each do |v|
|
14
|
+
params[v.to_sym] = request.params[v] if request.params[v]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def build_access_token
|
20
|
+
options.token_params[:headers] = { 'Authorization' => basic_auth_header }
|
21
|
+
super
|
22
|
+
end
|
23
|
+
|
24
|
+
def basic_auth_header
|
25
|
+
'Basic ' + Base64.strict_encode64("#{options[:client_id]}:#{options[:client_secret]}")
|
26
|
+
end
|
27
|
+
|
28
|
+
def callback_url
|
29
|
+
full_host + callback_path
|
30
|
+
end
|
31
|
+
|
32
|
+
uid { raw_info['uuid'].to_s }
|
33
|
+
|
34
|
+
info do
|
35
|
+
{
|
36
|
+
'email' => email,
|
37
|
+
'username' => username,
|
38
|
+
'name' => fullname,
|
39
|
+
'nickname' => nickname,
|
40
|
+
'image' => image,
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
extra do
|
45
|
+
{
|
46
|
+
'raw_info' => raw_info
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
def raw_info
|
51
|
+
@raw_info ||= (JWT.decode access_token.params['id_token'], nil, false)[0]
|
52
|
+
end
|
53
|
+
|
54
|
+
def email
|
55
|
+
raw_info['email']
|
56
|
+
end
|
57
|
+
|
58
|
+
# <13 accounts have username instead of email
|
59
|
+
def username
|
60
|
+
raw_info['username']
|
61
|
+
end
|
62
|
+
|
63
|
+
def nickname
|
64
|
+
raw_info['nickname']
|
65
|
+
end
|
66
|
+
|
67
|
+
# use fullname to avoid clash with 'name'
|
68
|
+
def fullname
|
69
|
+
raw_info['name']
|
70
|
+
end
|
71
|
+
|
72
|
+
def image
|
73
|
+
# deserialise openid claim into auth schema
|
74
|
+
raw_info['picture']
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
OmniAuth.config.add_camelization 'hydra0', 'Hydra0'
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'omniauth-oauth2'
|
4
|
+
require 'jwt'
|
5
|
+
|
6
|
+
module OmniAuth
|
7
|
+
module Strategies
|
8
|
+
class Hydra1 < OmniAuth::Strategies::OAuth2
|
9
|
+
option :client_options, {
|
10
|
+
site: 'https://auth-v1.raspberrypi.org',
|
11
|
+
authorize_url:'https://auth-v1.raspberrypi.org/oauth2/auth',
|
12
|
+
token_url: 'https://auth-v1.raspberrypi.org/oauth2/token'
|
13
|
+
}
|
14
|
+
|
15
|
+
def authorize_params
|
16
|
+
super.tap do |params|
|
17
|
+
%w[scope client_options].each do |v|
|
18
|
+
params[v.to_sym] = request.params[v] if request.params[v]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def callback_url
|
24
|
+
full_host + callback_path
|
25
|
+
end
|
26
|
+
|
27
|
+
uid { raw_info['user'].to_s }
|
28
|
+
|
29
|
+
info do
|
30
|
+
{
|
31
|
+
'email' => email,
|
32
|
+
'username' => username,
|
33
|
+
'name' => fullname,
|
34
|
+
'nickname' => nickname,
|
35
|
+
'image' => image,
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
extra do
|
40
|
+
{
|
41
|
+
'raw_info' => raw_info
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
def raw_info
|
46
|
+
@raw_info ||= (JWT.decode access_token.params['id_token'], nil, false)[0]
|
47
|
+
end
|
48
|
+
|
49
|
+
def email
|
50
|
+
raw_info['email']
|
51
|
+
end
|
52
|
+
|
53
|
+
# <13 accounts have username instead of email
|
54
|
+
def username
|
55
|
+
raw_info['username']
|
56
|
+
end
|
57
|
+
|
58
|
+
def nickname
|
59
|
+
raw_info['nickname']
|
60
|
+
end
|
61
|
+
|
62
|
+
# use fullname to avoid clash with 'name'
|
63
|
+
def fullname
|
64
|
+
raw_info['name']
|
65
|
+
end
|
66
|
+
|
67
|
+
def image
|
68
|
+
# deserialise openid claim into auth schema
|
69
|
+
raw_info['picture']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
OmniAuth.config.add_camelization 'hydra1', 'Hydra1'
|
data/lib/omniauth-rpi.rb
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RpiAuthBypass
|
4
|
+
DEFAULT_UID = 'b6301f34-b970-4d4f-8314-f877bad8b150'
|
5
|
+
DEFAULT_EMAIL = 'web@raspberrypi.org'
|
6
|
+
DEFAULT_USERNAME = 'webteam'
|
7
|
+
DEFAULT_NAME = 'Web Team'
|
8
|
+
DEFAULT_NICKNAME = 'Web'
|
9
|
+
DEFAULT_PROFILE = 'https://profile.raspberrypi.org/not/a/real/path'
|
10
|
+
DEFAULT_IMAGE = 'https://www.placecage.com/200/200'
|
11
|
+
DEFAULT_ROLES = 'user'
|
12
|
+
DEFAULT_COUNTRY = 'United Kingdom'
|
13
|
+
DEFAULT_COUNTRY_CODE = 'GB'
|
14
|
+
DEFAULT_POSTCODE = 'SW1A 1AA'
|
15
|
+
DEFAULT_INFO = {
|
16
|
+
name: DEFAULT_NAME,
|
17
|
+
nickname: DEFAULT_NICKNAME,
|
18
|
+
email: DEFAULT_EMAIL,
|
19
|
+
username: DEFAULT_USERNAME,
|
20
|
+
image: DEFAULT_IMAGE,
|
21
|
+
}.freeze
|
22
|
+
DEFAULT_EXTRA = {
|
23
|
+
raw_info: {
|
24
|
+
roles: DEFAULT_ROLES,
|
25
|
+
name: DEFAULT_NAME,
|
26
|
+
nickname: DEFAULT_NICKNAME,
|
27
|
+
email: DEFAULT_EMAIL,
|
28
|
+
username: DEFAULT_USERNAME,
|
29
|
+
country: DEFAULT_COUNTRY,
|
30
|
+
country_code: DEFAULT_COUNTRY_CODE,
|
31
|
+
postcode: DEFAULT_POSTCODE,
|
32
|
+
profile: DEFAULT_PROFILE,
|
33
|
+
avatar: DEFAULT_IMAGE,
|
34
|
+
}
|
35
|
+
}.freeze
|
36
|
+
|
37
|
+
refine OmniAuth::Configuration do
|
38
|
+
def enable_rpi_auth_bypass
|
39
|
+
logger.info 'Enabling RpiAuthBypass'
|
40
|
+
add_rpi_mock unless @mock_auth[:rpi]
|
41
|
+
|
42
|
+
self.test_mode = self.rpi_auth_bypass = true
|
43
|
+
end
|
44
|
+
|
45
|
+
def disable_rpi_auth_bypass
|
46
|
+
logger.debug 'Disabing RpiAuthBypass'
|
47
|
+
@mock_auth.delete(:rpi)
|
48
|
+
|
49
|
+
self.test_mode = self.rpi_auth_bypass = false
|
50
|
+
end
|
51
|
+
|
52
|
+
def add_rpi_mock(uid: RpiAuthBypass::DEFAULT_UID, info: RpiAuthBypass::DEFAULT_INFO, extra: RpiAuthBypass::DEFAULT_EXTRA)
|
53
|
+
add_mock(:rpi, {
|
54
|
+
provider: 'Rpi',
|
55
|
+
uid: uid,
|
56
|
+
info: info,
|
57
|
+
extra: extra,
|
58
|
+
})
|
59
|
+
end
|
60
|
+
|
61
|
+
attr_writer :rpi_auth_bypass
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'omniauth-rpi/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'omniauth-rpi'
|
8
|
+
spec.version = OmniAuth::Rpi::VERSION
|
9
|
+
spec.author = 'Raspberry Pi Foundation'
|
10
|
+
spec.email = 'web@raspberrypi.org'
|
11
|
+
|
12
|
+
spec.summary = 'Official OmniAuth strategy for Raspberry Pi.'
|
13
|
+
spec.description = 'Supporting OmniAuth OAuth 2 authentication for Raspberry Pi accounts.'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.homepage = 'https://www.raspberrypi.org'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = 'bin'
|
21
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
+
|
23
|
+
spec.add_runtime_dependency 'jwt', '~> 2.2.3'
|
24
|
+
spec.add_runtime_dependency 'omniauth', '~> 2.0'
|
25
|
+
spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.4'
|
26
|
+
|
27
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
28
|
+
spec.add_development_dependency 'rake', '~> 12.3.3'
|
29
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
30
|
+
spec.add_development_dependency 'rubocop', '~> 1.20'
|
31
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.4.0'
|
32
|
+
spec.add_development_dependency 'simplecov', '~> 0.21.2'
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-rpi
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Raspberry Pi Foundation
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-09-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jwt
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.2.3
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.2.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: omniauth
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: omniauth-oauth2
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.4'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.4'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 12.3.3
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 12.3.3
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.20'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.20'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop-rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 2.4.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 2.4.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.21.2
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.21.2
|
139
|
+
description: Supporting OmniAuth OAuth 2 authentication for Raspberry Pi accounts.
|
140
|
+
email: web@raspberrypi.org
|
141
|
+
executables:
|
142
|
+
- console
|
143
|
+
- setup
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
148
|
+
- ".gitignore"
|
149
|
+
- ".rspec"
|
150
|
+
- ".rubocop.yml"
|
151
|
+
- ".tool-versions"
|
152
|
+
- ".travis.yml"
|
153
|
+
- CHANGELOG.md
|
154
|
+
- Gemfile
|
155
|
+
- LICENCE.md
|
156
|
+
- README.md
|
157
|
+
- Rakefile
|
158
|
+
- bin/console
|
159
|
+
- bin/setup
|
160
|
+
- lib/omniauth-rpi.rb
|
161
|
+
- lib/omniauth-rpi/version.rb
|
162
|
+
- lib/omniauth/strategies/hydra0.rb
|
163
|
+
- lib/omniauth/strategies/hydra1.rb
|
164
|
+
- lib/omniauth/strategies/rpi.rb
|
165
|
+
- lib/rpi_auth_bypass.rb
|
166
|
+
- omniauth-rpi.gemspec
|
167
|
+
homepage: https://www.raspberrypi.org
|
168
|
+
licenses:
|
169
|
+
- MIT
|
170
|
+
metadata: {}
|
171
|
+
post_install_message:
|
172
|
+
rdoc_options: []
|
173
|
+
require_paths:
|
174
|
+
- lib
|
175
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0'
|
185
|
+
requirements: []
|
186
|
+
rubygems_version: 3.1.4
|
187
|
+
signing_key:
|
188
|
+
specification_version: 4
|
189
|
+
summary: Official OmniAuth strategy for Raspberry Pi.
|
190
|
+
test_files: []
|