omniauth-gitlab 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -1
- data/lib/omniauth-gitlab/version.rb +1 -1
- data/lib/omniauth/strategies/gitlab.rb +2 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -20,9 +20,11 @@ Or install it yourself as:
|
|
20
20
|
## Basic Usage
|
21
21
|
|
22
22
|
use OmniAuth::Builder do
|
23
|
-
provider :gitlab, :site => 'https://your.git.lab.com/'
|
23
|
+
provider :gitlab, :site => 'https://your.git.lab.com/', :v => 'v3'
|
24
24
|
end
|
25
25
|
|
26
|
+
Default value for :v parameter is 'v3'.
|
27
|
+
|
26
28
|
## Contributing
|
27
29
|
|
28
30
|
1. Fork it
|
@@ -5,6 +5,7 @@ module OmniAuth
|
|
5
5
|
|
6
6
|
option :fields, [:email]
|
7
7
|
option :site, nil
|
8
|
+
option :v, 'v3'
|
8
9
|
option :uid_field, :email
|
9
10
|
option :on_login, nil
|
10
11
|
option :on_registration, nil
|
@@ -49,7 +50,7 @@ module OmniAuth
|
|
49
50
|
@identity ||= begin
|
50
51
|
conn = Faraday.new(:url => options[:site])
|
51
52
|
resp = conn.post do |req|
|
52
|
-
req.url
|
53
|
+
req.url "/api/#{options[:v]}/session"
|
53
54
|
req.headers['Content-Type'] = 'application/json'
|
54
55
|
req.params = { :email => request['email'], :password => request['password'] }
|
55
56
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-gitlab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|