omniauth-wistia 0.1.0 → 0.1.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 +4 -4
- data/CHANGELOG.md +10 -0
- data/Rakefile +1 -1
- data/lib/omniauth/strategies/wistia.rb +26 -14
- data/lib/omniauth/wistia/version.rb +1 -1
- data/omniauth-wistia.gemspec +15 -13
- metadata +24 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1a301fddb41a520fe57b528518fd40de15e3f8be58e93a39d87e64361ff97f6
|
4
|
+
data.tar.gz: 87ba89eb9881531283d1e6b41c859ec50a5c564a630fb75fc9c649f1010e11ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f40fa6db2af447e33d067aeaa086da9f7dde605fd1b31553bdcb57c187eff9e9727e1714536386b6fc80309abd6398d5dd1fa430727ed810e6b9b6e26fe2cebc
|
7
|
+
data.tar.gz: 11aa30380febf5fceed2d6a3d7f860c4c8e9cca28c6df7f33b707296260dad6a3805c73a109dbdaa4aacc3776d92e68cdb5674e91325f193d4072dd7ae1c17ec
|
data/CHANGELOG.md
ADDED
data/Rakefile
CHANGED
@@ -1,37 +1,49 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "omniauth-oauth2"
|
2
|
+
require "multi_json"
|
3
3
|
|
4
4
|
module OmniAuth
|
5
5
|
module Strategies
|
6
6
|
class Wistia < OmniAuth::Strategies::OAuth2
|
7
|
-
DEFAULT_SCOPE =
|
7
|
+
DEFAULT_SCOPE = "all:all"
|
8
8
|
|
9
|
-
option :name,
|
9
|
+
option :name, "wistia"
|
10
10
|
|
11
11
|
option :client_options, {
|
12
|
-
:
|
13
|
-
:
|
14
|
-
:
|
12
|
+
site: "https://api.wistia.com",
|
13
|
+
authorize_path: "/oauth/authorize",
|
14
|
+
token_url: "/oauth/token"
|
15
15
|
}
|
16
16
|
|
17
|
+
uid do
|
18
|
+
raw_info["id"]
|
19
|
+
end
|
20
|
+
|
21
|
+
info do
|
22
|
+
{
|
23
|
+
name: raw_info["name"],
|
24
|
+
email: request.params["contact_email"],
|
25
|
+
urls: {
|
26
|
+
account: raw_info["url"]
|
27
|
+
}
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
17
31
|
extra do
|
18
32
|
{
|
19
|
-
|
33
|
+
"raw_info" => raw_info.merge(request.params.slice("contact_id", "contact_email"))
|
20
34
|
}
|
21
35
|
end
|
22
36
|
|
23
37
|
def raw_info
|
24
|
-
@raw_info ||= access_token.get(
|
38
|
+
@raw_info ||= access_token.get("https://api.wistia.com/v1/account.json").parsed
|
25
39
|
end
|
26
40
|
|
27
41
|
protected
|
28
42
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
client.auth_code.get_token(verifier, params.merge(token_params.to_hash(:symbolize_keys => true)), deep_symbolize(options.auth_token_params))
|
43
|
+
# Override callback URL to strip query params, Wistia is strict about this (as per oauth2 spec).
|
44
|
+
def callback_url
|
45
|
+
full_host + script_name + callback_path
|
33
46
|
end
|
34
|
-
|
35
47
|
end
|
36
48
|
end
|
37
49
|
end
|
data/omniauth-wistia.gemspec
CHANGED
@@ -1,27 +1,29 @@
|
|
1
|
-
require_relative
|
1
|
+
require_relative "lib/omniauth/wistia/version"
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
|
-
spec.name
|
5
|
-
spec.version
|
6
|
-
spec.authors
|
7
|
-
spec.email
|
4
|
+
spec.name = "omniauth-wistia"
|
5
|
+
spec.version = Omniauth::Wistia::VERSION
|
6
|
+
spec.authors = ["Chris Oliver"]
|
7
|
+
spec.email = ["excid3@gmail.com"]
|
8
8
|
|
9
|
-
spec.summary
|
10
|
-
spec.description
|
11
|
-
spec.homepage
|
12
|
-
spec.license
|
9
|
+
spec.summary = "OmniAuth strategy for Wistia"
|
10
|
+
spec.description = "OmniAuth strategy for Wistia"
|
11
|
+
spec.homepage = "https://github.com/excid3/omniauth-wistia"
|
12
|
+
spec.license = "MIT"
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
14
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
16
16
|
spec.metadata["source_code_uri"] = spec.homepage
|
17
|
-
#spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
17
|
+
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
18
18
|
|
19
19
|
# Specify which files should be added to the gem when it is released.
|
20
20
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
|
-
spec.files
|
21
|
+
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
|
22
22
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
23
|
end
|
24
|
-
spec.bindir
|
25
|
-
spec.executables
|
24
|
+
spec.bindir = "exe"
|
25
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
26
|
spec.require_paths = ["lib"]
|
27
|
+
|
28
|
+
spec.add_dependency "omniauth-oauth2", ">= 1.7", "< 2.0"
|
27
29
|
end
|
metadata
CHANGED
@@ -1,15 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-wistia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Oliver
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
12
|
-
dependencies:
|
11
|
+
date: 2020-08-11 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'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.7'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.0'
|
13
33
|
description: OmniAuth strategy for Wistia
|
14
34
|
email:
|
15
35
|
- excid3@gmail.com
|
@@ -19,6 +39,7 @@ extra_rdoc_files: []
|
|
19
39
|
files:
|
20
40
|
- ".gitignore"
|
21
41
|
- ".travis.yml"
|
42
|
+
- CHANGELOG.md
|
22
43
|
- CODE_OF_CONDUCT.md
|
23
44
|
- Gemfile
|
24
45
|
- LICENSE.txt
|