Module: QuorumSdk::Node::Auth

Included in:
QuorumSdk::Node
Defined in:
lib/quorum_sdk/node/auth.rb

Overview

Auth module

Instance Method Summary collapse

Instance Method Details

#allow_list(group_id: nil) ⇒ Object

Raises:



7
8
9
10
11
12
13
# File 'lib/quorum_sdk/node/auth.rb', line 7

def allow_list(group_id: nil)
  group_id ||= @group_id
  raise ArgumentError, 'group_id must be provided' if group_id.blank?

  path = "api/v1/node/#{group_id}/auth/alwlist"
  client.get(path).body
end

#auth_type(group_id: nil, trx_type: 'POST') ⇒ Object

Raises:



23
24
25
26
27
28
29
# File 'lib/quorum_sdk/node/auth.rb', line 23

def auth_type(group_id: nil, trx_type: 'POST')
  group_id ||= @group_id
  raise ArgumentError, 'group_id must be provided' if group_id.blank?

  path = "api/v1/node/#{group_id}/auth/by/#{trx_type}"
  client.get(path).body
end

#deny_list(group_id: nil) ⇒ Object

Raises:



15
16
17
18
19
20
21
# File 'lib/quorum_sdk/node/auth.rb', line 15

def deny_list(group_id: nil)
  group_id ||= @group_id
  raise ArgumentError, 'group_id must be provided' if group_id.blank?

  path = "api/v1/node/#{group_id}/auth/denylist"
  client.get(path).body
end