omniauth-adobo-network 1.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/.github/workflows/gem-push.yml +48 -0
- data/Gemfile +3 -0
- data/LICENSE.md +19 -0
- data/README.md +1 -0
- data/lib/omniauth/strategies/adobo_profile_strategy.rb +33 -0
- data/omniauth-adobo-network.gemspec +22 -0
- metadata +77 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7bc3bf16037a0c6913a96aa90dea8085cb1b93b7ac891682b10a045d5c100cb6
|
4
|
+
data.tar.gz: a16c0dc54718222d5a8e79cca66ccd9e6d3717a43773f86ade99396f5285290b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0f1dd394597ace9102db1606309cbcb225fd6bf81e9fec0442e17da8c672f01da577ad939bbe361ca318598503481faf1effed0e69ceefd64aba151fa4cc41bb
|
7
|
+
data.tar.gz: 10afa4392b27499eee792453e9e2d59d6c0cbaa74264e30e9488b7b8629661786ebadafa33bb2dc1d39d3f6553dbf719da01cdf95835fa06cf7af2d4f8c504e0
|
@@ -0,0 +1,48 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "master" ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "master" ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
build:
|
11
|
+
name: Build + Publish
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
permissions:
|
14
|
+
contents: read
|
15
|
+
packages: write
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v4
|
19
|
+
- name: Set up Ruby 2.6
|
20
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
21
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
22
|
+
# uses: ruby/setup-ruby@v1
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: 2.7.8
|
26
|
+
|
27
|
+
- name: Publish to GPR
|
28
|
+
run: |
|
29
|
+
mkdir -p $HOME/.gem
|
30
|
+
touch $HOME/.gem/credentials
|
31
|
+
chmod 0600 $HOME/.gem/credentials
|
32
|
+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
33
|
+
gem build *.gemspec
|
34
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
35
|
+
env:
|
36
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
37
|
+
OWNER: ${{ github.repository_owner }}
|
38
|
+
|
39
|
+
- name: Publish to RubyGems
|
40
|
+
run: |
|
41
|
+
mkdir -p $HOME/.gem
|
42
|
+
touch $HOME/.gem/credentials
|
43
|
+
chmod 0600 $HOME/.gem/credentials
|
44
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
45
|
+
gem build *.gemspec
|
46
|
+
gem push *.gem
|
47
|
+
env:
|
48
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
data/Gemfile
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (C) Nicu Listana
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# OmniAuth Adobo Network
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class AdoboProfile < OmniAuth::Strategies::OAuth2
|
6
|
+
# change the class name and the :name option to match your application name
|
7
|
+
option :name, :adobo_network
|
8
|
+
|
9
|
+
option :client_options, {
|
10
|
+
site: 'http://localhost:3000',
|
11
|
+
authorize_url: '/oauth/authorize'
|
12
|
+
}
|
13
|
+
|
14
|
+
uid { raw_info['id'] }
|
15
|
+
|
16
|
+
info do
|
17
|
+
{
|
18
|
+
email: raw_info['email']
|
19
|
+
# and anything else you want to return to your API consumers
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def raw_info
|
24
|
+
@raw_info ||= access_token.get('/api/v1/me.json').parsed
|
25
|
+
end
|
26
|
+
|
27
|
+
# https://github.com/intridea/omniauth-oauth2/issues/81
|
28
|
+
def callback_url
|
29
|
+
full_host + script_name + callback_path
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.add_dependency "omniauth-oauth2", "~> 1.8.0"
|
6
|
+
|
7
|
+
gem.add_development_dependency "bundler", "~> 2.0"
|
8
|
+
|
9
|
+
gem.authors = ["Nicu Listana"]
|
10
|
+
gem.email = ["niculistana@gmail.com"]
|
11
|
+
gem.description = "Adobo Network OAuth Strategy based on OmniOAuth OAuth2"
|
12
|
+
gem.summary = gem.description
|
13
|
+
gem.homepage = "https://github.com/adobocorp/omniauth-adobo-network"
|
14
|
+
gem.licenses = %w[MIT]
|
15
|
+
|
16
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").collect { |f| File.basename(f) }
|
17
|
+
gem.files = `git ls-files`.split("\n")
|
18
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
gem.name = "omniauth-adobo-network"
|
20
|
+
gem.require_paths = %w[lib]
|
21
|
+
gem.version = "1.0.1"
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-adobo-network
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nicu Listana
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-05-31 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.8.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.8.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
description: Adobo Network OAuth Strategy based on OmniOAuth OAuth2
|
42
|
+
email:
|
43
|
+
- niculistana@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".github/workflows/gem-push.yml"
|
49
|
+
- Gemfile
|
50
|
+
- LICENSE.md
|
51
|
+
- README.md
|
52
|
+
- lib/omniauth/strategies/adobo_profile_strategy.rb
|
53
|
+
- omniauth-adobo-network.gemspec
|
54
|
+
homepage: https://github.com/adobocorp/omniauth-adobo-network
|
55
|
+
licenses:
|
56
|
+
- MIT
|
57
|
+
metadata: {}
|
58
|
+
post_install_message:
|
59
|
+
rdoc_options: []
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
requirements: []
|
73
|
+
rubygems_version: 3.4.19
|
74
|
+
signing_key:
|
75
|
+
specification_version: 4
|
76
|
+
summary: Adobo Network OAuth Strategy based on OmniOAuth OAuth2
|
77
|
+
test_files: []
|