omniauth-nexaas_id 0.2.2 → 1.0.0

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: ffbdedfc4a67720237e75d81c45154740a9634fd7ae94bf3cd14c8f1f4b7405b
4
- data.tar.gz: dd340a7b4b4bf2b3e8a649a7e8e1570f868a05d937a8942df30e7b8a138efce9
3
+ metadata.gz: 210d52bd7e659ecd08cbc3048c2a671d0ff990d1df74cb83df3d108c82de7856
4
+ data.tar.gz: 0f0968a44127fccbe7a1afd0ed781acd59de8c0b4dfb098839b28cf2eb7552c5
5
5
  SHA512:
6
- metadata.gz: 8ebed646694821ceaafb0218bb4bc833daeacdc341afa17ffac8c5f3a095eb9a96431c6ba110ee82931f51129a1745fe5a29db5c6204c9b26128a0bfa820af44
7
- data.tar.gz: ea5f2769c4ebf38ab7ec568e0a4934ee29295bafa3c2b710a1556947f5f3e48b77e9546ad375ac5e9cbb8164a65bec6b8fc2cea6afebfa09df9411000ab89845
6
+ metadata.gz: e4a5cd64183a2815438be8d02444acec887a9bb2b78bfddad18eee8df769f63515a2207399f2665154b195e5d119b9018fa6f4d1746ca9228760a49e46e9a09a
7
+ data.tar.gz: f0cdca92b7c7d0b4fe76533599f3ada836964d882badb9d0981c53cccaf12f42138cabd4b006dc8cb22780685b4b8876ea5d9fd0224bcec881c2c94b956888fa
@@ -1,2 +1,3 @@
1
1
  require 'omniauth-oauth2'
2
2
  require 'omniauth/strategies/nexaas_id'
3
+ require 'omniauth/strategies/nexaas_id_passwordless'
@@ -53,7 +53,7 @@ module OmniAuth
53
53
 
54
54
  def list_emails?
55
55
  options[:list_emails] || options['list_emails'] ||
56
- options[:client_options][:list_emails]
56
+ options[:client_options][:list_emails] # TODO: remove this line
57
57
  end
58
58
 
59
59
  protected
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'nexaas_id'
4
+
5
+ OmniAuth.config.add_camelization('nexaas_id_passwordless', 'NexaasIDPasswordless')
6
+
7
+ module OmniAuth
8
+ module Strategies
9
+ class NexaasIDPasswordless < OmniAuth::Strategies::NexaasID
10
+
11
+ option :name, :nexaas_id_passwordless
12
+ option :client_options, site: 'https://id.nexaas.com',
13
+ authorize_url: '/oauth/passwordless/authorize'
14
+
15
+ private
16
+
17
+ def callback_url
18
+ uri = URI.parse(super)
19
+ return uri.to_s if uri.query.nil?
20
+ new_query = URI.decode_www_form(uri.query).reject { |query| query[0] == 'passwordless_token' }
21
+ uri.query = new_query.empty? ? nil : URI.encode_www_form(new_query)
22
+ uri.to_s
23
+ end
24
+ end
25
+ end
26
+ end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "omniauth-nexaas_id"
7
- spec.version = "0.2.2"
7
+ spec.version = "1.0.0"
8
8
  spec.authors = ["Rodrigo Tassinari de Oliveira", "Luiz Carlos Buiatte"]
9
9
  spec.email = ["rodrigo@pittlandia.net", "luiz.buiatte@nexaas.com"]
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-nexaas_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Tassinari de Oliveira
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-11-01 00:00:00.000000000 Z
12
+ date: 2019-07-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth-oauth2
@@ -100,6 +100,7 @@ files:
100
100
  - bin/setup
101
101
  - lib/omniauth-nexaas_id.rb
102
102
  - lib/omniauth/strategies/nexaas_id.rb
103
+ - lib/omniauth/strategies/nexaas_id_passwordless.rb
103
104
  - omniauth-nexaas_id.gemspec
104
105
  homepage: https://github.com/myfreecomm/omniauth-nexaas_id
105
106
  licenses:
@@ -120,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
121
  - !ruby/object:Gem::Version
121
122
  version: '0'
122
123
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 2.7.6
124
+ rubygems_version: 3.0.3
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Nexaas ID OAuth2 strategy for Omniauth.