authrocket 3.6.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/CHANGELOG.md +10 -0
- data/LICENSE +1 -1
- data/authrocket.gemspec +24 -19
- data/lib/authrocket/api/api_config.rb +21 -19
- data/lib/authrocket/api/version.rb +1 -1
- data/lib/authrocket/mailing_list_provider.rb +1 -1
- data/lib/authrocket/{hook_state.rb → mailing_list_subscription.rb} +1 -1
- data/lib/authrocket/smtp_provider.rb +1 -1
- data/lib/authrocket/user.rb +4 -4
- data/lib/authrocket.rb +1 -1
- metadata +10 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca2b450264123e1f8c829da1502ec2e522ccb83b0a198947177f998abf52a4e6
|
4
|
+
data.tar.gz: c9e85fd3e027dc8ef10cb2a250f389461cf0c5315c85104c96859445044c134b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24e006d46f8bdaa08cb09da92093489b6120d1c27f8a506082f425f7bb7eb5e2c75d968364fadd2fc8d0dbc256a619d46e8160c3b4e385ad85336e6985f00022
|
7
|
+
data.tar.gz: 18f53e295fdf755d687cf82b200b96ae2169257a8e80c82040e22d1c7a7783671cfb2568706f1e23f1e70dd4181accbe87a867565123ba25249119d8ce9b2a22
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
#### 3.8.0
|
2
|
+
|
3
|
+
- Lazy load ENVs
|
4
|
+
- Require Ruby >= 2.7
|
5
|
+
|
6
|
+
#### 3.7.0
|
7
|
+
|
8
|
+
- Add MailingListSubscription (replaces HookState)
|
9
|
+
- Update MailingListProvider, SmtpProvider
|
10
|
+
|
1
11
|
#### 3.6.0
|
2
12
|
|
3
13
|
- Add MailingListProvider, SmtpProvider (replaces Connection)
|
data/LICENSE
CHANGED
data/authrocket.gemspec
CHANGED
@@ -3,27 +3,32 @@ lib = File.expand_path('../lib', __FILE__)
|
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'authrocket/api/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "authrocket"
|
8
|
+
spec.version = AuthRocket::VERSION
|
9
|
+
spec.authors = ["AuthRocket Team"]
|
10
|
+
spec.email = ["hello@authrocket.com"]
|
11
|
+
spec.description = %q{AuthRocket client for Ruby.}
|
12
|
+
spec.summary = %q{AuthRocket client for Ruby}
|
13
|
+
spec.homepage = 'https://authrocket.com/'
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
spec.metadata = {
|
17
|
+
'source_code_uri' => 'https://github.com/authrocket/authrocket-ruby',
|
18
|
+
'changelog_uri' => 'https://github.com/authrocket/authrocket-ruby/blob/master/CHANGELOG.md'
|
19
|
+
}
|
20
20
|
|
21
|
-
|
21
|
+
spec.files = `git ls-files`.split($/)
|
22
|
+
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
23
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
24
|
+
spec.require_paths = ["lib"]
|
22
25
|
|
23
|
-
|
24
|
-
gem.add_dependency 'ncore', '~> 3.0'
|
25
|
-
gem.add_dependency 'jwt', '~> 2.1'
|
26
|
+
spec.required_ruby_version = '>= 2.7'
|
26
27
|
|
27
|
-
|
28
|
-
|
28
|
+
spec.add_dependency 'addressable', '~> 2.5'
|
29
|
+
spec.add_dependency 'ncore', '~> 3.10'
|
30
|
+
spec.add_dependency 'jwt', '~> 2.1'
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler"
|
33
|
+
spec.add_development_dependency "rake"
|
29
34
|
end
|
@@ -4,7 +4,9 @@ module AuthRocket
|
|
4
4
|
SingletonResource.send :include, AuthRocket::Client
|
5
5
|
|
6
6
|
configure do
|
7
|
-
self.default_url =
|
7
|
+
self.default_url = proc do
|
8
|
+
ENV['AUTHROCKET_URL']
|
9
|
+
end
|
8
10
|
|
9
11
|
self.default_headers = {
|
10
12
|
accept: 'application/json',
|
@@ -12,30 +14,30 @@ module AuthRocket
|
|
12
14
|
user_agent: "AuthRocket/ruby v#{VERSION} [nc #{NCore::VERSION}]"
|
13
15
|
}
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
api_key: ENV['AUTHROCKET_API_KEY'],
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
17
|
+
self.credentials = proc do
|
18
|
+
c = if ENV['AUTHROCKET_URI']
|
19
|
+
parse_credentials ENV['AUTHROCKET_URI']
|
20
|
+
elsif ENV['AUTHROCKET_API_KEY']
|
21
|
+
{ api_key: ENV['AUTHROCKET_API_KEY'],
|
22
|
+
realm: ENV['AUTHROCKET_REALM'],
|
23
|
+
service: ENV['AUTHROCKET_SERVICE'],
|
24
|
+
}
|
25
|
+
else
|
26
|
+
{}
|
27
|
+
end
|
28
|
+
if ENV['AUTHROCKET_JWT_KEY']
|
29
|
+
c[:jwt_key] ||= ENV['AUTHROCKET_JWT_KEY']
|
30
|
+
end
|
31
|
+
if ENV['LOGINROCKET_URL']
|
32
|
+
c[:loginrocket_url] = ENV['LOGINROCKET_URL']
|
33
|
+
end
|
34
|
+
c
|
32
35
|
end
|
33
36
|
|
34
37
|
self.debug = false
|
35
38
|
|
36
39
|
self.strict_attributes = true
|
37
40
|
|
38
|
-
|
39
41
|
self.i18n_scope = :authrocket
|
40
42
|
|
41
43
|
self.instrument_key = 'request.authrocket'
|
data/lib/authrocket/user.rb
CHANGED
@@ -5,7 +5,7 @@ module AuthRocket
|
|
5
5
|
belongs_to :realm
|
6
6
|
has_many :credentials
|
7
7
|
has_many :events
|
8
|
-
has_many :
|
8
|
+
has_many :mailing_list_subscriptions
|
9
9
|
has_many :memberships
|
10
10
|
has_many :sessions
|
11
11
|
|
@@ -42,7 +42,7 @@ module AuthRocket
|
|
42
42
|
obj
|
43
43
|
end
|
44
44
|
|
45
|
-
# params - {token: '
|
45
|
+
# params - {token: 'tmf:...', code: '000000'}
|
46
46
|
# returns: Session
|
47
47
|
def authenticate_token(params)
|
48
48
|
params = parse_request_params(params, json_root: json_root)
|
@@ -61,7 +61,7 @@ module AuthRocket
|
|
61
61
|
obj
|
62
62
|
end
|
63
63
|
|
64
|
-
# params - {token: '
|
64
|
+
# params - {token: 'tpw:...', password: '...', password_confirmation: '...'}
|
65
65
|
# returns: Session || Token
|
66
66
|
def reset_password_with_token(params)
|
67
67
|
params = parse_request_params(params, json_root: json_root)
|
@@ -80,7 +80,7 @@ module AuthRocket
|
|
80
80
|
obj
|
81
81
|
end
|
82
82
|
|
83
|
-
# params - {token: '
|
83
|
+
# params - {token: 'tve:...'}
|
84
84
|
# returns: User
|
85
85
|
def verify_email(params)
|
86
86
|
params = parse_request_params(params, json_root: json_root)
|
data/lib/authrocket.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authrocket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AuthRocket Team
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: addressable
|
@@ -30,14 +29,14 @@ dependencies:
|
|
30
29
|
requirements:
|
31
30
|
- - "~>"
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3.
|
32
|
+
version: '3.10'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
37
|
- - "~>"
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
39
|
+
version: '3.10'
|
41
40
|
- !ruby/object:Gem::Dependency
|
42
41
|
name: jwt
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,10 +108,10 @@ files:
|
|
109
108
|
- lib/authrocket/domain.rb
|
110
109
|
- lib/authrocket/event.rb
|
111
110
|
- lib/authrocket/hook.rb
|
112
|
-
- lib/authrocket/hook_state.rb
|
113
111
|
- lib/authrocket/invitation.rb
|
114
112
|
- lib/authrocket/jwt_key.rb
|
115
113
|
- lib/authrocket/mailing_list_provider.rb
|
114
|
+
- lib/authrocket/mailing_list_subscription.rb
|
116
115
|
- lib/authrocket/membership.rb
|
117
116
|
- lib/authrocket/named_permission.rb
|
118
117
|
- lib/authrocket/notification.rb
|
@@ -130,8 +129,9 @@ files:
|
|
130
129
|
homepage: https://authrocket.com/
|
131
130
|
licenses:
|
132
131
|
- MIT
|
133
|
-
metadata:
|
134
|
-
|
132
|
+
metadata:
|
133
|
+
source_code_uri: https://github.com/authrocket/authrocket-ruby
|
134
|
+
changelog_uri: https://github.com/authrocket/authrocket-ruby/blob/master/CHANGELOG.md
|
135
135
|
rdoc_options: []
|
136
136
|
require_paths:
|
137
137
|
- lib
|
@@ -139,15 +139,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
139
|
requirements:
|
140
140
|
- - ">="
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version: '2.
|
142
|
+
version: '2.7'
|
143
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
145
|
- - ">="
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
|
-
rubygems_version: 3.
|
150
|
-
signing_key:
|
149
|
+
rubygems_version: 3.6.9
|
151
150
|
specification_version: 4
|
152
151
|
summary: AuthRocket client for Ruby
|
153
152
|
test_files: []
|