Skip to content

Commit f6032b9

Browse files
authored
Merge pull request #90 from mamantoha/develop
Explicitly set request_body OAuth2 auth scheme
2 parents 3ce56fd + 8bf7425 commit f6032b9

File tree

9 files changed

+17
-12
lines changed

9 files changed

+17
-12
lines changed

.github/workflows/ruby.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
88
strategy:
99
matrix:
10-
ruby: [2.6, 2.7, 3.0, 3.1, head, jruby, jruby-head]
10+
ruby: [2.7, 3.0, 3.1, 3.2, head, jruby, jruby-head]
1111
os: [ubuntu-latest, macos-latest]
1212
runs-on: ${{ matrix.os }}
1313
steps:

.rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
AllCops:
22
NewCops: enable
3-
TargetRubyVersion: 2.6
3+
TargetRubyVersion: 2.7
44
Layout/LineLength:
55
Max: 120
66
Metrics/MethodLength:
77
Enabled: false
88
Metrics/BlockLength:
99
Enabled: false
1010
Metrics/ClassLength:
11-
Max: 101
11+
Enabled: false
1212
Lint/DuplicateBranch:
1313
Enabled: false
1414
Naming/FileName:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2011-2022 Anton Maminov
3+
Copyright (c) 2011-2023 Anton Maminov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Tested with the following Ruby versions:
114114

115115
## License
116116

117-
Copyright: 2011-2022 Anton Maminov (anton.maminov@gmail.com)
117+
Copyright: 2011-2023 Anton Maminov (anton.maminov@gmail.com)
118118

119119
This library is distributed under the MIT license. Please see the LICENSE file.
120120

examples/main.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'pp'
43
require 'sinatra'
54
require 'omniauth'
65
require 'omniauth-vkontakte'

lib/omniauth/strategies/vkontakte.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ class NoRawData < StandardError; end
2121

2222
option :name, 'vkontakte'
2323

24-
option :client_options,
25-
site: 'https://api.vk.com/',
26-
token_url: 'https://oauth.vk.com/access_token',
27-
authorize_url: 'https://oauth.vk.com/authorize'
24+
option :client_options, {
25+
site: 'https://api.vk.com/',
26+
token_url: 'https://oauth.vk.com/access_token',
27+
authorize_url: 'https://oauth.vk.com/authorize',
28+
auth_scheme: :request_body
29+
}
2830

2931
option :authorize_options, %i[scope display]
3032

lib/omniauth/vkontakte/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module OmniAuth
44
module Vkontakte
5-
VERSION = '1.8.0'
5+
VERSION = '1.8.1'
66
end
77
end

omniauth-vkontakte.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
1414
gem.name = 'omniauth-vkontakte'
1515
gem.require_paths = ['lib']
1616
gem.version = OmniAuth::Vkontakte::VERSION
17-
gem.required_ruby_version = '>= 2.6.0'
17+
gem.required_ruby_version = '>= 2.7.0'
1818
gem.add_runtime_dependency 'omniauth-oauth2', '>= 1.5', '<= 1.8.0'
1919
gem.metadata['rubygems_mfa_required'] = 'true'
2020
end

spec/omniauth/strategies/vkontakte_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
it 'should have correct token url' do
4444
expect(subject.options.client_options.token_url).to eq('https://oauth.vk.com/access_token')
4545
end
46+
47+
it 'should have correct auth_scheme' do
48+
expect(subject.options.client_options.auth_scheme).to eq(:request_body)
49+
end
4650
end
4751

4852
describe 'info' do

0 commit comments

Comments
 (0)