gatleon-rails 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90625201da0b5ddab250949f38befe5283dcc7639a3d518afd55c6d589965505
4
- data.tar.gz: 1f35559f4c4af83338dbc01c2644176ac1ceeb283fdc6023149d572db89034bb
3
+ metadata.gz: 3fbd403fe8bde2764f7cb539ec19c1fe45df93dc419a99e750d953761b0a1f65
4
+ data.tar.gz: 312643f43d5cc728b66a57749bcabce17d6a2e5831a16b532252b39cf4030e87
5
5
  SHA512:
6
- metadata.gz: 0af5de07b5e57412450e3f06a21740cdffe75422696ecade36f1332cc96b8859853270b741b76b75c5377222b76b072fd81d6e9ad35cbe7bbd562543e17d8c5c
7
- data.tar.gz: 788028f961213556c40a1d9dcf16357acc87c5035d028e19c8d6c9954987cd807a62c069def46dff8a76e8bc8ad0d9e2a12bd6e9ee94a8c5bf4d2cf6a9aeaa1b
6
+ metadata.gz: b7b9ad87afa7b1a9d50ceef24d7cead481639868d5293a9fb3e7ff12529b2bee0477c69dad5b927bda4f535bc71cb7a7010e75cd923d1ecf09b99c2695634ced
7
+ data.tar.gz: ee3817b847928391a5123b2bd04bce9696d48b913b9a67e2611b5daa0dc0530cbb6ab72d2eeb1df1b0e3dc3ccae8220d8691cac5b68c37a53cdffe7da368982e
data/Gemfile CHANGED
@@ -3,6 +3,5 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in gatleon-rails.gemspec
4
4
  gemspec
5
5
 
6
- gem "faraday"
7
6
  gem "rake", "~> 12.0"
8
7
  gem "rspec", "~> 3.0"
data/Gemfile.lock CHANGED
@@ -1,16 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gatleon-rails (0.1.9)
5
- faraday
4
+ gatleon-rails (0.1.10)
6
5
 
7
6
  GEM
8
7
  remote: https://rubygems.org/
9
8
  specs:
10
9
  diff-lcs (1.3)
11
- faraday (1.0.0)
12
- multipart-post (>= 1.2, < 3)
13
- multipart-post (2.1.1)
14
10
  rake (12.3.3)
15
11
  rspec (3.9.0)
16
12
  rspec-core (~> 3.9.0)
@@ -30,7 +26,6 @@ PLATFORMS
30
26
  ruby
31
27
 
32
28
  DEPENDENCIES
33
- faraday
34
29
  gatleon-rails!
35
30
  rake (~> 12.0)
36
31
  rspec (~> 3.0)
@@ -24,6 +24,4 @@ Gem::Specification.new do |spec|
24
24
  spec.bindir = "exe"
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ["lib"]
27
-
28
- spec.add_runtime_dependency "faraday"
29
27
  end
@@ -27,9 +27,11 @@ module Gatleon
27
27
  define_method :_exchange_user_voucher_for_user do
28
28
  if params[:_authformForm] == form_uid && params[:_authformUserVoucher]
29
29
  # TODO: headers for api verification
30
- response = Faraday.get("#{_authform_base_url}/v1/exchangeUserVoucherForUser/#{params[:_authformUserVoucher]}")
30
+
31
+ uri = URI("#{_authform_base_url}/v1/exchangeUserVoucherForUser/#{params[:_authformUserVoucher]}")
32
+ response = Net::HTTP.get_response(uri)
31
33
 
32
- if response.status == 200
34
+ if response.code.to_i == 200
33
35
  cookies[_authform_user_cookie_key] = {
34
36
  value: response.body,
35
37
  domain: :all
@@ -38,6 +40,7 @@ module Gatleon
38
40
 
39
41
  q = Rack::Utils.parse_query(URI.parse(request.url).query)
40
42
  q.delete("_authformUserVoucher")
43
+ q.delete("_authformForm")
41
44
  url = q.empty? ? request.path : "#{request.path}?#{q.to_query}"
42
45
 
43
46
  redirect_to url, status: 302 # redirect to finish removal of query param
@@ -1,5 +1,5 @@
1
1
  module Gatleon
2
2
  module Rails
3
- VERSION = "0.1.9"
3
+ VERSION = "0.1.10"
4
4
  end
5
5
  end
data/lib/gatleon/rails.rb CHANGED
@@ -1,4 +1,4 @@
1
- require "faraday"
1
+ require "net/http"
2
2
  require "gatleon/rails/version"
3
3
  require "gatleon/rails/authform/concern"
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gatleon-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - gatleon
@@ -9,21 +9,7 @@ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2020-04-04 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: faraday
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
12
+ dependencies: []
27
13
  description: add authentication to your website - in 1 minute or less.
28
14
  email:
29
15
  - ''