omniauth-naranya_id 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/naranya_id.rb +2 -0
- data/lib/naranya_id/user.rb +7 -0
- data/lib/omniauth-naranya_id/version.rb +1 -1
- data/lib/omniauth/strategies/naranya_id.rb +12 -1
- data/omniauth-naranya_id.gemspec +2 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c6cf87ecd4cfbc16285bc461405172991bcb343
|
4
|
+
data.tar.gz: cfc67136830bdf7e2cd7f6218828b333a4895df3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dbf9a155d795624b9e5934c4e8ec58a1d288d23b6d8c17e2d92bb510f111a897895db49fbd545a3f403bf16bb106dc199ec3c085851791b2e7c3748fb0d80e3
|
7
|
+
data.tar.gz: 9376eeee039cd19281b74f974c1b628b60a42fd5fae99bc67541d03d7020f1f1bc36dec70c5aa919d3bfd959a9a6599eb9bbf84cc8a1e3f78286cba0cc676bb7
|
data/lib/naranya_id.rb
CHANGED
data/lib/naranya_id/user.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'active_support/core_ext/hash'
|
2
|
+
|
1
3
|
module NaranyaId
|
2
4
|
class User
|
3
5
|
include ActiveModel::Model
|
@@ -10,6 +12,11 @@ module NaranyaId
|
|
10
12
|
|
11
13
|
class << self
|
12
14
|
|
15
|
+
def email_exists?(given_email_address)
|
16
|
+
Net::HTTP.get
|
17
|
+
consumer.post('/register/checkemail.php')
|
18
|
+
end
|
19
|
+
|
13
20
|
def translate_attributes(attributes)
|
14
21
|
translated_attributes = {
|
15
22
|
id: attributes[:uuid],
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'omniauth-oauth'
|
2
|
-
require '
|
2
|
+
require 'active_support/core_ext/hash'
|
3
3
|
require 'naranya_id'
|
4
4
|
require 'oauth/signature/plaintext'
|
5
5
|
|
@@ -48,6 +48,17 @@ module OmniAuth
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
+
# Override para habilitar/deshabilitar el output de debuggeo de HTTP:
|
52
|
+
def consumer
|
53
|
+
consumer = ::OAuth::Consumer.new(options.consumer_key, options.consumer_secret, options.client_options)
|
54
|
+
consumer.http.open_timeout = options.open_timeout if options.open_timeout
|
55
|
+
consumer.http.read_timeout = options.read_timeout if options.read_timeout
|
56
|
+
|
57
|
+
# Se habilita el output sólo si en las opciones debug_oauth es true:
|
58
|
+
consumer.http.set_debug_output($stderr) if options.debug_oauth
|
59
|
+
consumer
|
60
|
+
end
|
61
|
+
|
51
62
|
# Indicates if the SDK's api key + secret are missing
|
52
63
|
def sdk_key_or_secret_missing?
|
53
64
|
!(::NaranyaId.config.has_key?(:api_key) && ::NaranyaId.config.has_key?(:api_secret))
|
data/omniauth-naranya_id.gemspec
CHANGED
@@ -18,9 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.
|
22
|
-
spec.
|
23
|
-
|
21
|
+
spec.add_runtime_dependency "activesupport", "~> 4"
|
22
|
+
spec.add_runtime_dependency "activemodel", "~> 4"
|
24
23
|
spec.add_runtime_dependency 'omniauth-oauth', '~> 1.0'
|
25
24
|
|
26
25
|
spec.add_development_dependency 'bundler', "~> 1.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-naranya_id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Quintanilla
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|