tanker-core 2.6.5.beta.1 → 2.9.0.beta.1
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/lib/tanker/admin.rb +8 -2
- data/lib/tanker/admin/app.rb +3 -3
- data/lib/tanker/core/init.rb +4 -0
- data/lib/tanker/core/options.rb +4 -3
- data/lib/tanker/core/session.rb +4 -0
- data/lib/tanker/core/version.rb +1 -1
- data/vendor/tanker/darwin-x86_64/libctanker.dylib +0 -0
- data/vendor/tanker/linux-x86_64/libctanker.so +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f75547a8f1a7ced05f1edb1488c8a951c517010fb68d8c18155d3981372937c
|
4
|
+
data.tar.gz: f69209bcbb37b7a5e7d5797f35a4e3a430bce21cef237358d252db5cb23b9fe4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a80c3124ad08962451032941c2ecfa169a46bb7d73f02916df24a2c0dc485be7c55afd95568e83f2c0163aaa35a6e510fc08a15ac276319e06f0dce74093152
|
7
|
+
data.tar.gz: 040d71e2d86cdceacf1bef98e16bfcd09130554a5a8a2b168dd815b28f65b6dbb1bbad75e2fd4c7d594a8a03a7ab854356a98e9b54e4839145889b7e83f4fa44
|
data/lib/tanker/admin.rb
CHANGED
@@ -7,10 +7,11 @@ require_relative 'admin/app'
|
|
7
7
|
|
8
8
|
module Tanker
|
9
9
|
class Admin
|
10
|
-
def initialize(admin_url
|
10
|
+
def initialize(admin_url:, api_url:, trustchain_url:, id_token:)
|
11
11
|
@admin_url = admin_url
|
12
12
|
@id_token = id_token
|
13
13
|
@api_url = api_url
|
14
|
+
@trustchain_url = trustchain_url
|
14
15
|
end
|
15
16
|
|
16
17
|
# Authenticate to the Tanker admin server API
|
@@ -27,7 +28,12 @@ module Tanker
|
|
27
28
|
assert_connected
|
28
29
|
descriptor_ptr = CAdmin.tanker_admin_create_app(@cadmin, name).get
|
29
30
|
descriptor = CAdmin::CAppDescriptor.new(descriptor_ptr)
|
30
|
-
App.new(
|
31
|
+
App.new(
|
32
|
+
trustchain_url: @trustchain_url,
|
33
|
+
id: descriptor[:id],
|
34
|
+
auth_token: descriptor[:auth_token],
|
35
|
+
private_key: descriptor[:private_key]
|
36
|
+
)
|
31
37
|
end
|
32
38
|
|
33
39
|
def delete_app(app_id)
|
data/lib/tanker/admin/app.rb
CHANGED
@@ -6,15 +6,15 @@ module Tanker
|
|
6
6
|
class App
|
7
7
|
attr_reader :url, :id, :auth_token, :private_key
|
8
8
|
|
9
|
-
def initialize(
|
10
|
-
@
|
9
|
+
def initialize(trustchain_url:, id:, auth_token:, private_key:)
|
10
|
+
@trustchain_url = trustchain_url
|
11
11
|
@id = id
|
12
12
|
@auth_token = auth_token
|
13
13
|
@private_key = private_key
|
14
14
|
end
|
15
15
|
|
16
16
|
def get_verification_code(email)
|
17
|
-
CAdmin.tanker_get_verification_code(@
|
17
|
+
CAdmin.tanker_get_verification_code(@trustchain_url, @id, @auth_token, email).get_string
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
data/lib/tanker/core/init.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
module Tanker
|
4
4
|
# Main entry point for the Tanker SDK. Can open a Tanker session.
|
5
5
|
class Core
|
6
|
+
extend Gem::Deprecate
|
7
|
+
|
6
8
|
@log_handler_lock = Mutex.new
|
7
9
|
@log_handler_set = 0
|
8
10
|
|
@@ -63,6 +65,8 @@ module Tanker
|
|
63
65
|
@revoke_event_handlers.add block
|
64
66
|
end
|
65
67
|
|
68
|
+
deprecate :connect_device_revoked_handler, :none, 2021, 7
|
69
|
+
|
66
70
|
def disconnect_handler(&block)
|
67
71
|
@revoke_event_handlers.delete block
|
68
72
|
end
|
data/lib/tanker/core/options.rb
CHANGED
@@ -13,20 +13,21 @@ module Tanker
|
|
13
13
|
:sdk_type, :pointer,
|
14
14
|
:sdk_version, :pointer
|
15
15
|
|
16
|
-
SDK_TYPE =
|
16
|
+
SDK_TYPE = 'client-ruby'
|
17
17
|
SDK_VERSION = CTanker.new_cstring Core::VERSION
|
18
18
|
|
19
|
-
def initialize(app_id:, url: nil, writable_path: nil)
|
19
|
+
def initialize(app_id:, url: nil, sdk_type: SDK_TYPE, writable_path: nil)
|
20
20
|
# Note: Instance variables are required to keep the CStrings alive
|
21
21
|
@app_id = CTanker.new_cstring app_id
|
22
22
|
@url = CTanker.new_cstring url
|
23
23
|
@writable_path = CTanker.new_cstring writable_path
|
24
|
+
@sdk_type = CTanker.new_cstring sdk_type
|
24
25
|
|
25
26
|
self[:version] = 2
|
26
27
|
self[:app_id] = @app_id
|
27
28
|
self[:url] = @url
|
28
29
|
self[:writable_path] = @writable_path
|
29
|
-
self[:sdk_type] =
|
30
|
+
self[:sdk_type] = @sdk_type
|
30
31
|
self[:sdk_version] = SDK_VERSION
|
31
32
|
end
|
32
33
|
end
|
data/lib/tanker/core/session.rb
CHANGED
@@ -5,6 +5,8 @@ require_relative 'status'
|
|
5
5
|
|
6
6
|
module Tanker
|
7
7
|
class Core
|
8
|
+
extend Gem::Deprecate
|
9
|
+
|
8
10
|
def start(identity)
|
9
11
|
CTanker.tanker_start(@ctanker, identity).get.address
|
10
12
|
end
|
@@ -62,6 +64,8 @@ module Tanker
|
|
62
64
|
CTanker.tanker_revoke_device(@ctanker, device_id).get
|
63
65
|
end
|
64
66
|
|
67
|
+
deprecate :revoke_device, :none, 2021, 7
|
68
|
+
|
65
69
|
def stop
|
66
70
|
CTanker.tanker_stop(@ctanker).get
|
67
71
|
end
|
data/lib/tanker/core/version.rb
CHANGED
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tanker-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanker team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|