omniauth-streamlabs 0.2.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: efc3e2d0ab4e64c225d4f77ed8432331e35b5b79
4
- data.tar.gz: a1c53c61be87b9db4e23710e989a2f6f02dc4375
2
+ SHA256:
3
+ metadata.gz: 60c11f4eaf99670b314aac984caccfa48c4cb75df5bdb9832225fcc1972c506d
4
+ data.tar.gz: 8734683d635d01e1b3dae4cb05656bb56c79dfe11149933de1f8c9e869c4b701
5
5
  SHA512:
6
- metadata.gz: 4911d9ba97994da9366fd079f9997d0a7575fc34a488a93db82acfd197ebddce327b427408f0ac56d2aa98e3ff97a895736f618bdcd265984c5ca92d9fdcc9d9
7
- data.tar.gz: ba64ce507488bbcf03d1e6d2144f79511e4662bec8cc49539d23cf802a7672d374fb1e39e6d7a068db9fcf3173f32a25b33cc711ca543eeb0bebbf9167c4953d
6
+ metadata.gz: de208f2a1f889193588240be81fada6ebfffb1067c6281a572631bfe5ffe270e0c5cf35aafe2a621735f5576f1bb7f7f569a3439e71ac25878fb06deb5ce914f
7
+ data.tar.gz: 8c600759b5e0eddc09544655a9b3df0f6d4aefd7e7d7d2d8b42c9cedc341f4867d6e1fb4dcbddac43df1d05bfca56a9bdf0de1a587daace9b80d6e093f6cd2cd
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Omniauth::Streamlabs
2
2
 
3
+ An Omniauth strategy for Streamlabs
4
+
3
5
  ## Installation
4
6
 
5
7
  Add this line to your application's Gemfile:
@@ -18,19 +20,46 @@ Or install it yourself as:
18
20
 
19
21
  ## Usage
20
22
 
21
- TODO: Write usage instructions here
23
+ Here's an example for adding the middleware to a Rails app in `config/initializers/omniauth.rb`:
22
24
 
23
- ## Development
25
+ ```ruby
26
+ Rails.application.config.middleware.use OmniAuth::Builder do
27
+ provider :twitch, ENV["STREAMLABS_CLIENT_ID"], ENV["STREAMLABS_CLIENT_SECRET"]
28
+ end
29
+ ```
24
30
 
25
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
31
+ ## Auth Hash
26
32
 
27
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
33
+ Here's an example *Auth Hash* available in `request.env['omniauth.auth']`:
34
+
35
+ ```ruby
36
+ {
37
+ provider: 'streamlabs',
38
+ uid: 12345678,
39
+ info: {
40
+ display_name: 'johndoe',
41
+ name: 'JohnDoe',
42
+ },
43
+ credentials: {
44
+ token: 'asdfghjklasdfghjklasdfghjkl', # OAuth 2.0 access_token, which you may wish to store
45
+ expires: false # this will always be false
46
+ },
47
+ extra: {
48
+ raw_info: {
49
+ twitch: {
50
+ display_name: 'johndoe',
51
+ name: 'JohnDoe',
52
+ _id: 12345678,
53
+ },
54
+ }
55
+ }
56
+ }
57
+ ```
28
58
 
29
59
  ## Contributing
30
60
 
31
61
  Bug reports and pull requests are welcome on GitHub at https://github.com/prognostikos/omniauth-streamlabs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
32
62
 
33
-
34
63
  ## License
35
64
 
36
65
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -20,12 +20,12 @@ module OmniAuth
20
20
 
21
21
  option :authorize_options, [:scope]
22
22
 
23
- uid{ raw_info['twitch']['id'] }
23
+ uid{ raw_info['streamlabs']['id'] }
24
24
 
25
25
  info do
26
26
  {
27
- display_name: raw_info['twitch']['display_name'],
28
- name: raw_info['twitch']['name']
27
+ display_name: raw_info['streamlabs']['display_name'],
28
+ name: raw_info['streamlabs']['display_name']
29
29
  }
30
30
  end
31
31
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Streamlabs
3
- VERSION = "0.2.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
Binary file
@@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.1'
24
24
 
25
- spec.add_development_dependency "bundler", "~> 1.13"
26
- spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "bundler", ">= 2.2.10"
26
+ spec.add_development_dependency "rake", ">= 12.3.3"
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-streamlabs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Rohrer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-14 00:00:00.000000000 Z
11
+ date: 2021-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -28,31 +28,31 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.13'
33
+ version: 2.2.10
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.13'
40
+ version: 2.2.10
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: 12.3.3
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
55
- description:
54
+ version: 12.3.3
55
+ description:
56
56
  email:
57
57
  - matt@prognostikos.com
58
58
  executables: []
@@ -71,12 +71,13 @@ files:
71
71
  - lib/omniauth/strategies/streamlabs.rb
72
72
  - lib/omniauth/streamlabs.rb
73
73
  - lib/omniauth/streamlabs/version.rb
74
+ - omniauth-streamlabs-1.0.0.gem
74
75
  - omniauth-streamlabs.gemspec
75
76
  homepage: https://github.com/prognostikos/omniauth-streamlabs
76
77
  licenses:
77
78
  - MIT
78
79
  metadata: {}
79
- post_install_message:
80
+ post_install_message:
80
81
  rdoc_options: []
81
82
  require_paths:
82
83
  - lib
@@ -91,9 +92,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
92
  - !ruby/object:Gem::Version
92
93
  version: '0'
93
94
  requirements: []
94
- rubyforge_project:
95
- rubygems_version: 2.6.7
96
- signing_key:
95
+ rubygems_version: 3.1.4
96
+ signing_key:
97
97
  specification_version: 4
98
98
  summary: Streamlabs OAuth2 strategy for OmniAuth
99
99
  test_files: []