ravelin 0.1.40 → 0.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ravelin/authentication_mechanism.rb +4 -0
- data/lib/ravelin/authentication_mechanisms/social.rb +31 -0
- data/lib/ravelin/version.rb +1 -1
- data/lib/ravelin.rb +3 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ed7ce357df63f506c0332cda6d685e243c629dba53882e698c3c97c83110eb3
|
4
|
+
data.tar.gz: 7964f60d9fe6070c8cef7b906bc784dde0074e91f605e052c09416ad473c10b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7178959b3ccbb0cb4b55c1ef5de904fa5a3d662479a07e5246ce1d075af22acae6dc3de070c008e01f1abce11be3ae4ca25ebeee76e2e7c39ed6861f714dc864
|
7
|
+
data.tar.gz: ac1965cd41a4f15e058524a69bc782b9f984f7e2bc3418e2aa252382e25125e33a4d45b822e7d6153c53e943bc5a311218e386fcceb98c8caa8dfa8582be7b2e
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Ravelin
|
2
|
+
module AuthenticationMechanisms
|
3
|
+
class Social < RavelinObject
|
4
|
+
PROVIDERS = %w(apple azure facebook google linkedin microsoft okta onelogin ping twitter)
|
5
|
+
FAILURE_REASONS = %w(TIMEOUT UNKNOWN_USERNAME INTERNAL_ERROR RATE_LIMIT SOCIAL_FAILURE BANNED_USER)
|
6
|
+
|
7
|
+
attr_accessor :success, :social_provider, :failure_reason
|
8
|
+
attr_required :success, :social_provider
|
9
|
+
|
10
|
+
def social_provider=(provider)
|
11
|
+
@social_provider = provider.to_s.downcase
|
12
|
+
end
|
13
|
+
|
14
|
+
def failure_reason=(reason)
|
15
|
+
@failure_reason = reason.to_s.upcase
|
16
|
+
end
|
17
|
+
|
18
|
+
def validate
|
19
|
+
super
|
20
|
+
|
21
|
+
if !success && !FAILURE_REASONS.include?(failure_reason)
|
22
|
+
raise ArgumentError.new("Failure reason value must be one of #{FAILURE_REASONS.join(', ')}")
|
23
|
+
end
|
24
|
+
|
25
|
+
if !PROVIDERS.include?(social_provider)
|
26
|
+
raise ArgumentError.new("Social provider value must be one of #{PROVIDERS.join(', ')}")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/ravelin/version.rb
CHANGED
data/lib/ravelin.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ravelin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.41
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Levy
|
8
8
|
- Tommy Palmer
|
9
9
|
- Gurkan Oluc
|
10
10
|
- Mathilda Thompson
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-
|
14
|
+
date: 2021-12-03 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- lib/ravelin/ato_login.rb
|
113
113
|
- lib/ravelin/ato_reclaim.rb
|
114
114
|
- lib/ravelin/authentication_mechanism.rb
|
115
|
+
- lib/ravelin/authentication_mechanisms/social.rb
|
115
116
|
- lib/ravelin/chargeback.rb
|
116
117
|
- lib/ravelin/checkout_transaction.rb
|
117
118
|
- lib/ravelin/client.rb
|
@@ -145,7 +146,7 @@ homepage: https://developer.ravelin.com
|
|
145
146
|
licenses:
|
146
147
|
- MIT
|
147
148
|
metadata: {}
|
148
|
-
post_install_message:
|
149
|
+
post_install_message:
|
149
150
|
rdoc_options: []
|
150
151
|
require_paths:
|
151
152
|
- lib
|
@@ -160,9 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
161
|
- !ruby/object:Gem::Version
|
161
162
|
version: '0'
|
162
163
|
requirements: []
|
163
|
-
|
164
|
-
|
165
|
-
signing_key:
|
164
|
+
rubygems_version: 3.0.9
|
165
|
+
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Ruby bindings for the Ravelin API
|
168
168
|
test_files: []
|