oa-vkontakte 0.1.2 → 0.1.3
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.
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/lib/omniauth/strategies/vkontakte_open_api/view_helper.rb +5 -2
- data/oa-vkontakte.gemspec +2 -2
- metadata +4 -4
data/README.rdoc
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
<%= vkontakte_login_button %>
|
|
22
22
|
|
|
23
|
-
Также кнопка доступна по адресу /auth/vkontakte
|
|
23
|
+
Также кнопка доступна по адресу /auth/vkontakte, но форма там передается GET-запросом. Можно пропробовать встроить её как iframe.
|
|
24
24
|
|
|
25
25
|
После клика на кнопку и разрешения добавления приложения, будет совершен POST-запрос на /auth/vkontakte/callback.
|
|
26
26
|
В action, к которому будет привязан этот путь, будет доступна переменная
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.3
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
1
2
|
module OmniAuth
|
|
2
3
|
module Strategies
|
|
3
4
|
class VkontakteOpenApi
|
|
@@ -37,12 +38,14 @@ HEADER
|
|
|
37
38
|
VK.Auth.login(vkLogin.loginResult);
|
|
38
39
|
},
|
|
39
40
|
redirectWithPost: function(url, data) {
|
|
40
|
-
method = "POST";
|
|
41
41
|
data = data || {};
|
|
42
|
+
#{ respond_to?(:request_forgery_protection_token) && respond_to?(:form_authenticity_token) ?
|
|
43
|
+
"data['#{request_forgery_protection_token}'] = '#{form_authenticity_token}'; var method = 'POST';" :
|
|
44
|
+
"var method = 'GET';" }
|
|
42
45
|
var form = document.createElement("form"),
|
|
43
46
|
input;
|
|
44
47
|
form.setAttribute("action", url);
|
|
45
|
-
form.setAttribute("method",
|
|
48
|
+
form.setAttribute("method", method);
|
|
46
49
|
|
|
47
50
|
for (var property in data) {
|
|
48
51
|
if (data.hasOwnProperty(property)) {
|
data/oa-vkontakte.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{oa-vkontakte}
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.3"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Nick Recobra"]
|
|
12
|
-
s.date = %q{2010-10-
|
|
12
|
+
s.date = %q{2010-10-20}
|
|
13
13
|
s.description = %q{OmniAuth extension for vkontakte.ru authentication}
|
|
14
14
|
s.email = %q{oruenu@gmail.com}
|
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: oa-vkontakte
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 29
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 3
|
|
10
|
+
version: 0.1.3
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Nick Recobra
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2010-10-
|
|
18
|
+
date: 2010-10-20 00:00:00 +04:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|