omniauth-sialog 0.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/.gitignore +1 -0
- data/.rubocop.yml +19 -0
- data/.rubocop_todo.yml +20 -0
- data/CHANGELOG.md +5 -0
- data/README.md +3 -0
- data/lib/omniauth/sialog/version.rb +7 -0
- data/lib/omniauth/sialog.rb +3 -0
- data/lib/omniauth/strategies/sialog.rb +42 -0
- data/lib/omniauth_sialog.rb +3 -0
- data/omniauth-sialog.gemspec +33 -0
- metadata +147 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 97366c8441fde5f24a9630c405126cd786ba9bebd39b909121ee61a80486cd2d
|
4
|
+
data.tar.gz: '08263e8e04edefeb3e68f805dc65ae677692443e00c27a36f0e12e70a3b33b17'
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ae37d245e450f95fd15565b63a04f0c6d557328d3a1455a49373376f745ae33c464e99facf4776548cd4383f0fafbee5833ac558c8e93c3409dbd09bc73149c2
|
7
|
+
data.tar.gz: 3340ca0586fe59cb3c560e0eec39dea9fa64135da19199410531c6997984d0334a5f6ab706a2b70d2c6b56dd024c8ffc0340f72bb27919a0a3efe63da7da178b
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/.idea
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
Metrics/LineLength:
|
4
|
+
Max: 200
|
5
|
+
|
6
|
+
Metrics/MethodLength:
|
7
|
+
Max: 30
|
8
|
+
|
9
|
+
Metrics/AbcSize:
|
10
|
+
Max: 60
|
11
|
+
|
12
|
+
Metrics/ClassLength:
|
13
|
+
Max: 250
|
14
|
+
|
15
|
+
Metrics/BlockLength:
|
16
|
+
Max: 30
|
17
|
+
|
18
|
+
AllCops:
|
19
|
+
TargetRubyVersion: 2.5
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2018-05-05 13:54:25 -0300 using RuboCop version 0.55.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: CountComments.
|
11
|
+
Metrics/ClassLength:
|
12
|
+
Max: 126
|
13
|
+
|
14
|
+
# Offense count: 1
|
15
|
+
Metrics/CyclomaticComplexity:
|
16
|
+
Max: 9
|
17
|
+
|
18
|
+
# Offense count: 1
|
19
|
+
Metrics/PerceivedComplexity:
|
20
|
+
Max: 9
|
data/CHANGELOG.md
ADDED
data/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'omniauth-oauth2'
|
4
|
+
|
5
|
+
module OmniAuth
|
6
|
+
module Strategies
|
7
|
+
# Sialog
|
8
|
+
class Sialog < OmniAuth::Strategies::OAuth2
|
9
|
+
option :name, :sialog
|
10
|
+
|
11
|
+
option :client_options, site: 'http://accounts.sialog.com', authorize_url: '/oauth/authorize'
|
12
|
+
|
13
|
+
uid { raw_info['id'] }
|
14
|
+
|
15
|
+
info do
|
16
|
+
{
|
17
|
+
email: raw_info['email'],
|
18
|
+
kind: raw_info['kind'],
|
19
|
+
company_group_id: raw_info['company_group_id'],
|
20
|
+
company_group_name: raw_info['company_group_name']
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def raw_info
|
25
|
+
@raw_info ||= access_token.get('/api/v1/user.json').parsed
|
26
|
+
end
|
27
|
+
|
28
|
+
def callback_url
|
29
|
+
full_host + script_name + callback_path
|
30
|
+
end
|
31
|
+
|
32
|
+
def build_access_token
|
33
|
+
options.token_params[:headers] = { Authorization: basic_auth_header }
|
34
|
+
super
|
35
|
+
end
|
36
|
+
|
37
|
+
def basic_auth_header
|
38
|
+
'Basic ' + Base64.strict_encode64("#{options[:client_id]}:#{options[:client_secret]}")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require File.expand_path(File.join('..', 'lib', 'omniauth', 'sialog', 'version'), __FILE__)
|
4
|
+
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gem.name = 'omniauth-sialog'
|
7
|
+
gem.version = OmniAuth::Sialog::VERSION
|
8
|
+
gem.license = 'MIT'
|
9
|
+
gem.summary = 'Sialog strategy for OmniAuth'
|
10
|
+
gem.description = 'Sialog strategy for OmniAuth. This allows you to interface with SialogAccounts.'
|
11
|
+
gem.authors = ['Francis Schiavo']
|
12
|
+
gem.email = ['francis@sialog.com.br']
|
13
|
+
gem.homepage = 'http://gitlab.sialog.com/sialog-rails/omniauth-sialog'
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split("\n")
|
16
|
+
gem.require_paths = ['lib']
|
17
|
+
|
18
|
+
gem.required_ruby_version = '>= 2.5'
|
19
|
+
|
20
|
+
gem.add_runtime_dependency 'jwt', '~> 1.5'
|
21
|
+
gem.add_runtime_dependency 'omniauth', '~> 1.1', '>= 1.1.1'
|
22
|
+
gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.5'
|
23
|
+
|
24
|
+
gem.add_development_dependency 'rake', '~> 12.0'
|
25
|
+
gem.add_development_dependency 'rspec', '~> 3.6'
|
26
|
+
gem.add_development_dependency 'rubocop', '~> 0.49'
|
27
|
+
|
28
|
+
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.' unless gem.respond_to?(:metadata)
|
29
|
+
|
30
|
+
gem.metadata['homepage_uri'] = gem.homepage
|
31
|
+
gem.metadata['source_code_uri'] = 'http://gitlab.sialog.com/sialog-rails/omniauth-sialog'
|
32
|
+
gem.metadata['changelog_uri'] = 'http://gitlab.sialog.com/sialog-rails/omniauth-sialog/blob/master/CHANGELOG.md'
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,147 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-sialog
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Francis Schiavo
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-02-27 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: '1.5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: omniauth
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.1'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 1.1.1
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.1'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.1.1
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: omniauth-oauth2
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.5'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.5'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rake
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '12.0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '12.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rspec
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '3.6'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.6'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rubocop
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0.49'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0.49'
|
103
|
+
description: Sialog strategy for OmniAuth. This allows you to interface with SialogAccounts.
|
104
|
+
email:
|
105
|
+
- francis@sialog.com.br
|
106
|
+
executables: []
|
107
|
+
extensions: []
|
108
|
+
extra_rdoc_files: []
|
109
|
+
files:
|
110
|
+
- ".gitignore"
|
111
|
+
- ".rubocop.yml"
|
112
|
+
- ".rubocop_todo.yml"
|
113
|
+
- CHANGELOG.md
|
114
|
+
- README.md
|
115
|
+
- lib/omniauth/sialog.rb
|
116
|
+
- lib/omniauth/sialog/version.rb
|
117
|
+
- lib/omniauth/strategies/sialog.rb
|
118
|
+
- lib/omniauth_sialog.rb
|
119
|
+
- omniauth-sialog.gemspec
|
120
|
+
homepage: http://gitlab.sialog.com/sialog-rails/omniauth-sialog
|
121
|
+
licenses:
|
122
|
+
- MIT
|
123
|
+
metadata:
|
124
|
+
homepage_uri: http://gitlab.sialog.com/sialog-rails/omniauth-sialog
|
125
|
+
source_code_uri: http://gitlab.sialog.com/sialog-rails/omniauth-sialog
|
126
|
+
changelog_uri: http://gitlab.sialog.com/sialog-rails/omniauth-sialog/blob/master/CHANGELOG.md
|
127
|
+
post_install_message:
|
128
|
+
rdoc_options: []
|
129
|
+
require_paths:
|
130
|
+
- lib
|
131
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '2.5'
|
136
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - ">="
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
141
|
+
requirements: []
|
142
|
+
rubyforge_project:
|
143
|
+
rubygems_version: 2.7.8
|
144
|
+
signing_key:
|
145
|
+
specification_version: 4
|
146
|
+
summary: Sialog strategy for OmniAuth
|
147
|
+
test_files: []
|