omniauth-zeuswpi 0.0.1
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 +56 -0
- data/Gemfile +5 -0
- data/LICENSE +21 -0
- data/lib/omniauth/strategies/zeuswpi.rb +41 -0
- data/lib/omniauth/zeuswpi/version.rb +7 -0
- data/lib/omniauth/zeuswpi.rb +3 -0
- data/lib/omniauth-zeuswpi.rb +3 -0
- data/omniauth-zeuswpi.gemspec +24 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f85d928de8aa7f50169f211a5e0d7274b953fd52f2659968028346ce41339d46
|
4
|
+
data.tar.gz: df0ac1cb065f9be81d7f097c1bbb64075adbb2b7d8ec939e77e2ff2f532eab67
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2c1606e92208e7529748e6f4f804e8dae9ad1a7fad8d1b147fd9467ef6e6b4ea1feb1b9face4022cacb29c71c92cbd000df5332b22e3225a4d05eb0a19b57479
|
7
|
+
data.tar.gz: 37ed560d4ec48400fd9502c7dc3b3e4a9ab63935871dbc52567b2cbdcd85db8db1a5d4258fc1c80a7468ab2e84c775593472ae2ee15c7920fac9fc8b7ddbfe1c
|
data/.gitignore
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
# Ignore Byebug command history file.
|
17
|
+
.byebug_history
|
18
|
+
|
19
|
+
## Specific to RubyMotion:
|
20
|
+
.dat*
|
21
|
+
.repl_history
|
22
|
+
build/
|
23
|
+
*.bridgesupport
|
24
|
+
build-iPhoneOS/
|
25
|
+
build-iPhoneSimulator/
|
26
|
+
|
27
|
+
## Specific to RubyMotion (use of CocoaPods):
|
28
|
+
#
|
29
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
30
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
31
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
32
|
+
#
|
33
|
+
# vendor/Pods/
|
34
|
+
|
35
|
+
## Documentation cache and generated files:
|
36
|
+
/.yardoc/
|
37
|
+
/_yardoc/
|
38
|
+
/doc/
|
39
|
+
/rdoc/
|
40
|
+
|
41
|
+
## Environment normalization:
|
42
|
+
/.bundle/
|
43
|
+
/vendor/bundle
|
44
|
+
/lib/bundler/man/
|
45
|
+
|
46
|
+
# for a library or gem, you might want to ignore these files since the code is
|
47
|
+
# intended to run in multiple environments; otherwise, check them in:
|
48
|
+
# Gemfile.lock
|
49
|
+
# .ruby-version
|
50
|
+
# .ruby-gemset
|
51
|
+
|
52
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
53
|
+
.rvmrc
|
54
|
+
|
55
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
56
|
+
# .rubocop-https?--*
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2022 Zeus WPI
|
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.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class Zeuswpi < OmniAuth::Strategies::OAuth2
|
6
|
+
|
7
|
+
# Give your strategy a name.
|
8
|
+
option :name, 'zeuswpi'
|
9
|
+
|
10
|
+
# This is important, see https://github.com/omniauth/omniauth-oauth2/issues/93#issuecomment-257319242
|
11
|
+
def callback_url
|
12
|
+
full_host + callback_path
|
13
|
+
end
|
14
|
+
|
15
|
+
# This is where you pass the options you would pass when
|
16
|
+
# initializing your consumer from the OAuth gem.
|
17
|
+
option :client_options, {
|
18
|
+
site: 'https://adams.ugent.be',
|
19
|
+
authorize_url: '/oauth/authorize/',
|
20
|
+
token_url: '/oauth/token/'
|
21
|
+
}
|
22
|
+
|
23
|
+
# These are called after authentication has succeeded. If
|
24
|
+
# possible, you should try to set the UID without making
|
25
|
+
# additional calls (if the user id is returned with the token
|
26
|
+
# or as a URI parameter). This may not be possible with all
|
27
|
+
# providers.
|
28
|
+
uid { raw_info['username'] }
|
29
|
+
|
30
|
+
extra do
|
31
|
+
{
|
32
|
+
'raw_info' => raw_info
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
def raw_info
|
37
|
+
@raw_info ||= access_token.get('/current_user').parsed
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require File.expand_path(
|
4
|
+
File.join('..', 'lib', 'omniauth', 'zeuswpi', 'version'),
|
5
|
+
__FILE__
|
6
|
+
)
|
7
|
+
|
8
|
+
Gem::Specification.new do |gem|
|
9
|
+
gem.name = 'omniauth-zeuswpi'
|
10
|
+
gem.version = OmniAuth::ZeusWPI::VERSION
|
11
|
+
gem.license = 'MIT'
|
12
|
+
gem.summary = %(A Zeus WPI strategy for OmniAuth 1.x)
|
13
|
+
gem.description = %(A Zeus WPI strategy for OmniAuth 1.x. This allows you to login to Zauth with your ruby app.)
|
14
|
+
gem.authors = ['Tom Naessens, Zeus WPI']
|
15
|
+
gem.email = ['']
|
16
|
+
gem.homepage = 'https://github.com/ZeusWPI/omniauth-zeuswpi'
|
17
|
+
|
18
|
+
gem.files = `git ls-files`.split("\n")
|
19
|
+
gem.require_paths = ['lib']
|
20
|
+
|
21
|
+
gem.required_ruby_version = '>= 2.2'
|
22
|
+
|
23
|
+
gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.7.1'
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-zeuswpi
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tom Naessens, Zeus WPI
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-05-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: omniauth-oauth2
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.7.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.7.1
|
27
|
+
description: A Zeus WPI strategy for OmniAuth 1.x. This allows you to login to Zauth
|
28
|
+
with your ruby app.
|
29
|
+
email:
|
30
|
+
- ''
|
31
|
+
executables: []
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- ".gitignore"
|
36
|
+
- Gemfile
|
37
|
+
- LICENSE
|
38
|
+
- lib/omniauth-zeuswpi.rb
|
39
|
+
- lib/omniauth/strategies/zeuswpi.rb
|
40
|
+
- lib/omniauth/zeuswpi.rb
|
41
|
+
- lib/omniauth/zeuswpi/version.rb
|
42
|
+
- omniauth-zeuswpi.gemspec
|
43
|
+
homepage: https://github.com/ZeusWPI/omniauth-zeuswpi
|
44
|
+
licenses:
|
45
|
+
- MIT
|
46
|
+
metadata: {}
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '2.2'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
requirements: []
|
62
|
+
rubygems_version: 3.3.7
|
63
|
+
signing_key:
|
64
|
+
specification_version: 4
|
65
|
+
summary: A Zeus WPI strategy for OmniAuth 1.x
|
66
|
+
test_files: []
|