authress-sdk 0.1.20.0 → 2.0.29.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -37
  3. data/lib/{swagger_client → authress_sdk}/api/access_records_api.rb +82 -89
  4. data/lib/{swagger_client → authress_sdk}/api/accounts_api.rb +31 -38
  5. data/lib/{swagger_client → authress_sdk}/api/metadata_api.rb +23 -30
  6. data/lib/{swagger_client → authress_sdk}/api/resource_permissions_api.rb +33 -40
  7. data/lib/{swagger_client → authress_sdk}/api/roles_api.rb +36 -43
  8. data/lib/{swagger_client → authress_sdk}/api/service_clients_api.rb +56 -63
  9. data/lib/{swagger_client → authress_sdk}/api/user_permissions_api.rb +44 -51
  10. data/lib/authress_sdk/api_error.rb +50 -0
  11. data/lib/{swagger_client/api_client.rb → authress_sdk/authress_client.rb} +36 -110
  12. data/lib/authress_sdk/constant_token_provider.rb +19 -0
  13. data/lib/{swagger_client → authress_sdk}/models/access_record.rb +17 -12
  14. data/lib/{swagger_client → authress_sdk}/models/access_record_collection.rb +4 -11
  15. data/lib/{swagger_client → authress_sdk}/models/account.rb +4 -11
  16. data/lib/{swagger_client/models/inline_response_200_11.rb → authress_sdk/models/account_collection.rb} +5 -12
  17. data/lib/{swagger_client → authress_sdk}/models/account_collection_accounts.rb +4 -11
  18. data/lib/{swagger_client → authress_sdk}/models/claim_request.rb +4 -11
  19. data/lib/{swagger_client → authress_sdk}/models/claim_response.rb +4 -11
  20. data/lib/{swagger_client → authress_sdk}/models/client.rb +4 -11
  21. data/lib/{swagger_client → authress_sdk}/models/client_access_key.rb +4 -11
  22. data/lib/{swagger_client → authress_sdk}/models/client_collection.rb +4 -11
  23. data/lib/{swagger_client/models/body_11.rb → authress_sdk/models/client_collection_clients.rb} +5 -12
  24. data/lib/{swagger_client → authress_sdk}/models/identity.rb +4 -11
  25. data/lib/{swagger_client → authress_sdk}/models/identity_collection.rb +4 -11
  26. data/lib/{swagger_client → authress_sdk}/models/identity_collection_identities.rb +4 -11
  27. data/lib/{swagger_client → authress_sdk}/models/identity_request.rb +4 -11
  28. data/lib/{swagger_client → authress_sdk}/models/inline_response_200.rb +4 -11
  29. data/lib/{swagger_client/models/body.rb → authress_sdk/models/inline_response_200_1.rb} +5 -12
  30. data/lib/{swagger_client/models/body_6.rb → authress_sdk/models/inline_response_200_10.rb} +5 -12
  31. data/lib/{swagger_client/models/account_collection.rb → authress_sdk/models/inline_response_200_11.rb} +5 -12
  32. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_12.rb +4 -11
  33. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_13.rb +4 -11
  34. data/lib/{swagger_client/models/body_10.rb → authress_sdk/models/inline_response_200_14.rb} +5 -12
  35. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_15.rb +4 -11
  36. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_2.rb +4 -11
  37. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_3.rb +4 -11
  38. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_4.rb +4 -11
  39. data/lib/{swagger_client/models/body_2.rb → authress_sdk/models/inline_response_200_5.rb} +5 -12
  40. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_6.rb +4 -11
  41. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_7.rb +4 -11
  42. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_9.rb +4 -11
  43. data/lib/{swagger_client → authress_sdk}/models/invite.rb +4 -11
  44. data/lib/{swagger_client → authress_sdk}/models/link.rb +4 -11
  45. data/lib/{swagger_client → authress_sdk}/models/metadata_object.rb +4 -11
  46. data/lib/{swagger_client/models/v1roles_permissions.rb → authress_sdk/models/permission_object.rb} +5 -12
  47. data/lib/{swagger_client → authress_sdk}/models/permission_response.rb +4 -11
  48. data/lib/{swagger_client → authress_sdk}/models/resource_permission.rb +4 -11
  49. data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection.rb +4 -11
  50. data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection_links.rb +4 -11
  51. data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection_links_next.rb +4 -11
  52. data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection_resources.rb +4 -11
  53. data/lib/{swagger_client → authress_sdk}/models/resource_users_collection.rb +4 -11
  54. data/lib/{swagger_client → authress_sdk}/models/role.rb +4 -11
  55. data/lib/{swagger_client → authress_sdk}/models/statement.rb +4 -11
  56. data/lib/{swagger_client → authress_sdk}/models/token_request.rb +4 -11
  57. data/lib/{swagger_client → authress_sdk}/models/user.rb +4 -11
  58. data/lib/{swagger_client → authress_sdk}/models/user_resources.rb +4 -11
  59. data/lib/{swagger_client → authress_sdk}/models/user_resources_resources.rb +4 -11
  60. data/lib/{swagger_client → authress_sdk}/models/user_token.rb +4 -11
  61. data/lib/{swagger_client → authress_sdk}/models/user_token_links.rb +4 -11
  62. data/lib/{swagger_client → authress_sdk}/models/user_token_links_self.rb +4 -11
  63. data/lib/{swagger_client → authress_sdk}/models/v1clients_options.rb +4 -11
  64. data/lib/{swagger_client → authress_sdk}/models/v1records_account.rb +4 -11
  65. data/lib/{swagger_client → authress_sdk}/models/v1records_links.rb +4 -11
  66. data/lib/{swagger_client → authress_sdk}/models/v1records_links_self.rb +4 -11
  67. data/lib/{swagger_client → authress_sdk}/models/v1records_users.rb +4 -11
  68. data/lib/{swagger_client → authress_sdk}/models/v1resourcesresource_uri_permissions.rb +4 -11
  69. data/lib/{swagger_client/models/permission_object.rb → authress_sdk/models/v1roles_permissions.rb} +5 -12
  70. data/lib/{swagger_client → authress_sdk}/models/v1usersuser_idresourcesresource_urimetadata_account.rb +4 -11
  71. data/lib/{swagger_client → authress_sdk}/models/v1usersuser_idtokens_resources.rb +4 -11
  72. data/lib/{swagger_client → authress_sdk}/models/v1usersuser_idtokens_statements.rb +4 -11
  73. data/lib/authress_sdk/service_client_token_provider.rb +19 -0
  74. data/lib/authress_sdk.rb +18 -0
  75. metadata +81 -108
  76. data/lib/swagger_client/api_error.rb +0 -57
  77. data/lib/swagger_client/configuration.rb +0 -205
  78. data/lib/swagger_client/models/access_record_collection_records.rb +0 -351
  79. data/lib/swagger_client/models/body_1.rb +0 -229
  80. data/lib/swagger_client/models/body_3.rb +0 -351
  81. data/lib/swagger_client/models/body_4.rb +0 -351
  82. data/lib/swagger_client/models/body_5.rb +0 -225
  83. data/lib/swagger_client/models/body_7.rb +0 -255
  84. data/lib/swagger_client/models/body_8.rb +0 -227
  85. data/lib/swagger_client/models/body_9.rb +0 -223
  86. data/lib/swagger_client/models/client_collection_clients.rb +0 -246
  87. data/lib/swagger_client/models/inline_response_200_1.rb +0 -236
  88. data/lib/swagger_client/models/inline_response_200_10.rb +0 -255
  89. data/lib/swagger_client/models/inline_response_200_14.rb +0 -246
  90. data/lib/swagger_client/models/inline_response_200_5.rb +0 -213
  91. data/lib/swagger_client/models/inline_response_200_8.rb +0 -351
  92. data/lib/swagger_client/version.rb +0 -14
  93. data/lib/swagger_client.rb +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0f4c75e258a72d3a4c3d0a21fe628d3d43aad9d0faf81c4fc4aa1e4d6b1ee34
4
- data.tar.gz: f4b603cd98c9c5068fa645a55532a0cc8a19a2934326ce075c7208f75df672c1
3
+ metadata.gz: d3c95b25f7727e7f6b90209419704f659a8738dd52ebaad303401b444cf90e7f
4
+ data.tar.gz: 7d401c5035c2228c58963a05c594fe76246353b60cb07c30502c15b02f492d66
5
5
  SHA512:
6
- metadata.gz: 3e519ce0fc9c3bcb48a307de7e4c5e8347b0f3504c7a6445522db030f5d0f69ded735a54ca864b80022ae8c4c3c566b54fd70316c33227760ddc24fd61186cbc
7
- data.tar.gz: 9bb5f4552bbca426284fe2c9a498c99b354c4bfd8ac7760cfbab9119bf5d1fa90ee9f54fb2c7e56df69652fc5699d51e4d426ecec6cefa1b0c5f940069866e4a
6
+ metadata.gz: 5800a573207985a6a2a27f9b51b7df07986e70c47f33b32d3f5851d12d91a8876e82ca3594e62cf1709d8147e39cd575dda1a93c43ffb47b9684ff6caa2135bf
7
+ data.tar.gz: b923b90bf8dead1f91fdc22f0f0b8f25fb022ba9e29ef01479073e15a44c64bcdf92534d4fa03f002d4b372cfce099b4589525925501fe5a6e0c2793b80c2638
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # authress-sdk.rb
1
+ # Authress SDK for Ruby
2
2
  This is the Authress SDK used to integrate with the authorization as a service provider Authress at https://authress.io.
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/authress-sdk.svg)](http://badge.fury.io/rb/authress-sdk)
@@ -12,86 +12,87 @@ gem install authress-sdk
12
12
 
13
13
  Then required the package:
14
14
  ```rb
15
- require 'authress-sdk';
15
+ require 'authress-sdk'
16
16
  ```
17
17
 
18
18
  ## Getting started examples
19
19
 
20
20
  ### Authorize using a user token
21
21
  ```rb
22
- require 'authress-sdk';
22
+ require 'authress-sdk'
23
23
 
24
24
  # create an instance of the API class during service initialization
25
- # Replace DOMAIN with the Authress domain for your account
26
- AuthressClient.configure do |config|
27
- config.base_url = 'https://DOMAIN.api-REGION.authress.io'
25
+ # Replace the base_url with the custom Authress domain for your account
26
+ # https://authress.io/app/#/settings?focus=domain
27
+ AuthressSdk.configure do |config|
28
+ config.base_url = 'https://login.company.com'
28
29
  end
29
30
 
30
31
  # on api route
31
32
  [route('/resources/<resourceId>')]
32
- function getResource(resourceId) {
33
+ def getResource(resourceId)
33
34
  # Get the user token and pass it to authress
34
- authorizationToken = request.headers.get('authorization');
35
- AuthressClient.setToken(authorizationToken);
35
+ authorizationToken = request.headers.get('authorization')
36
+ AuthressSdk::AuthressClient.set_token(authorizationToken)
36
37
 
37
38
  # Check Authress to authorize the user
38
39
  user_id = 'user_id_example' # String | The user to check permissions on
39
- resource_uri = `resources/${resourceId}` # String | The uri path of a resource to validate, must be URL encoded, uri segments are allowed, the resource must be a full path, and permissions are not inherited by sub-resources.
40
+ resource_uri = "resources/#{resourceId}" # String | The uri path of a resource to validate, must be URL encoded, uri segments are allowed, the resource must be a full path, and permissions are not inherited by sub-resources.
40
41
  permission = 'READ' # String | Permission to check, '*' and scoped permissions can also be checked here.
41
42
  begin
42
43
  #Check to see if a user has permissions to a resource.
43
- api_instance = SwaggerClient::UserPermissionsApi.new
44
+ api_instance = AuthressSdk::UserPermissionsApi.new
44
45
  api_instance.authorize_user(user_id, resource_uri, permission)
45
- rescue SwaggerClient::ApiError => e
46
+ rescue AuthressSdk::ApiError => e
46
47
  # Will throw except if the user is not authorized to read the resource
47
48
  if (e.status === 404) {
48
- return { statusCode: 404 };
49
+ return { statusCode: 404 }
49
50
  }
50
51
  puts "Exception when calling UserPermissionsApi->authorize_user: #{e}"
51
- throw e;
52
+ raise
52
53
  end
53
54
 
54
55
  # On success, continue with the route code to load resource and return it
55
- return { resource: {}, statusCode: 200 };
56
+ return { resource: {}, statusCode: 200 }
56
57
  ```
57
58
 
58
59
  ### Authorize with a service client
59
60
  ```rb
60
- require 'authress-sdk';
61
+ require 'authress-sdk'
61
62
 
62
63
  # create an instance of the API class during service initialization
63
64
  # Replace DOMAIN with the Authress domain for your account
64
65
 
65
66
  # Create a service client in the Authress management portal and past the access token here
66
67
  # This will generate a token automatically instead of passing the user token to the api
67
- AuthressClient.configure do |config|
68
- config.base_url = 'https://DOMAIN.api-REGION.authress.io'
69
- accessToken = 'eyJrZXlJ....';
70
- config.token_provider = ServiceClientTokenProvider.new(accessToken)
68
+ AuthressSdk.configure do |config|
69
+ config.base_url = 'https://login.company.com'
70
+ client_access_key = 'eyJrZXlJ....'
71
+ config.token_provider = AuthressSdk::ServiceClientTokenProvider.new(client_access_key)
71
72
  end
72
73
 
73
74
  # on api route
74
75
  [route('/resources/<resourceId>')]
75
- function getResource(resourceId) {
76
+ def getResource(resourceId) {
76
77
  # Check Authress to authorize the user
77
78
  user_id = 'user_id_example' # String | The user to check permissions on
78
- resource_uri = `resources/${resourceId}` # String | The uri path of a resource to validate, must be URL encoded, uri segments are allowed, the resource must be a full path, and permissions are not inherited by sub-resources.
79
+ resource_uri = "resources/#{resourceId}" # String | The uri path of a resource to validate, must be URL encoded, uri segments are allowed, the resource must be a full path, and permissions are not inherited by sub-resources.
79
80
  permission = 'READ' # String | Permission to check, '*' and scoped permissions can also be checked here.
80
81
  begin
81
- #Check to see if a user has permissions to a resource.
82
- api_instance = SwaggerClient::UserPermissionsApi.new
82
+ # Check to see if a user has permissions to a resource.
83
+ api_instance = AuthressSdk::UserPermissionsApi.new
83
84
  api_instance.authorize_user(user_id, resource_uri, permission)
84
- rescue SwaggerClient::ApiError => e
85
- # Will throw except if the user is not authorized to read the resource
85
+ rescue AuthressSdk::ApiError => e
86
+ # Will raise exception if the user is not authorized to read the resource
86
87
  if (e.status === 404) {
87
- return { statusCode: 404 };
88
+ return { statusCode: 404 }
88
89
  }
89
90
  puts "Exception when calling UserPermissionsApi->authorize_user: #{e}"
90
- throw e;
91
+ raise
91
92
  end
92
93
 
93
94
  # On success, continue with the route code to load resource and return it
94
- return { resource: {}, statusCode: 200 };
95
+ return { resource: {}, statusCode: 200 }
95
96
  ```
96
97
 
97
98
  ### Creating resources
@@ -100,23 +101,24 @@ When a user creates a resource in your application, we want to ensure that they
100
101
  You may receive **User does not have sufficient access to grant permissions to resources** as an error along with the status code **403**. This means that the service client or user jwt does not have access to create the access record. If using a service client, go to the Authress portal and create a one time record which grants the service client `Authress:Owner` to `Resources/` so that it can manage access records for these types of resources.
101
102
 
102
103
  ```rb
103
- require 'authress-sdk';
104
+ require 'authress-sdk'
104
105
 
105
106
  begin
106
- #Create a new access record.
107
- new_record = SwaggerClient::Body3.new {
108
- name: `Access To New Resource ${NewResourceId}`,
107
+ # Create a new access record.
108
+ new_record = AuthressSdk::AccessRecord.new {
109
+ name: "Access To New Resource #{NewResourceId}",
109
110
  users: [{ userId: requestUserId }],
110
111
  statements: [{
111
- resources: [{ resourceUri: `Resources/${NewResourceId}` }],
112
+ resources: [{ resourceUri: "Resources/#{NewResourceId}" }],
112
113
  # Owner by default gives full control over this new resource, including the ability to grant others access as well.
113
114
  roles: ['Authress:Owner']
114
115
  }]
115
- };
116
- api_instance = SwaggerClient::AccessRecordsApi.new
116
+ }
117
+ api_instance = AuthressSdk::AccessRecordsApi.new
117
118
  result = api_instance.create_record(new_record)
118
119
  puts result
119
- rescue SwaggerClient::ApiError => e
120
+ rescue AuthressSdk::ApiError => e
120
121
  puts "Exception when calling AccessRecordsApi->create_record: #{e}"
122
+ raise
121
123
  end
122
124
  ```
@@ -1,20 +1,13 @@
1
1
  =begin
2
- #Authress
3
2
 
4
- #<p> <h2>Authorization</h2> <p>Authorization for Authress is handled one of two different ways. Both mechanisms use oauth2 <i>Bearer</i> tokens.</p> <br> <h4>Identity Provider JWT</h4> <p>Hook up your preferred identity provider directly to Authress. Authress will verify JWTs sourced from that identify provider and allow direct integration with these APIs. Any OIDC JWT provider works, Google, Auth0, Okta, etc... With this mechanism your web app can make direct calls to the permissions API on behalf of your users. <br> <a href=\"https://authress.io/app/#/manage?focus=identity\">Link identity provider</a> </p> <br> <h4>Authress Clients</h4> <p>Regardless of using direct identity provider integration, with the API you can create Authress clients which can call any of the methods on the API. Your users won't be able to directly make API calls, all web app integrations must go through a service which stores the Authress private key. <br> <a href=\"https://authress.io/app/#/manage?focus=clients\">Create Authress service client</a> </p> <br> <h2>Usage</h2> <h4>Billable APIs</h4> <p>Most of the api available is completely free. Use it to populate your roles and configure your account. You'll only be charged for the ones marked as Billable.</p> <p><ul> <li><i class=\"far fa-fw fa-money-bill-alt text-primary\"></i> <span class=\"text-primary\">Billable</span> - <small>These APIs count as calls for your account and will be charged.</small></li> <li><i class=\"fas fa-fw fa-angle-double-right text-secondary\"></i> <span class=\"text-secondary\">Free</span> - <small>These are totally free.</small></li> <li><i class=\"fas fa-fw fa-balance-scale text-secondary\"></i> <span class=\"text-secondary\">Condition</span> - <small>Are conditionally free, see api methods for details.</small></li> </ul></p> <br> <h4>API Access</h4> <p>Access to the following APIs is based on Authress permissions, not the application permissions assigned in Authress to the application services. Each resource is tagged with the required permission <span class=\"badge badge-outline-secondary\">Action: Resource</span> </p>
5
-
6
- OpenAPI spec version: v1
7
- Contact: support@authress.io
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.23
10
3
  =end
11
4
 
12
- module SwaggerClient
5
+ module AuthressSdk
13
6
  class AccessRecordsApi
14
- attr_accessor :api_client
7
+ attr_accessor :authress_client
15
8
 
16
- def initialize(api_client = ApiClient.default)
17
- @api_client = api_client
9
+ def initialize(authress_client = AuthressClient.default)
10
+ @authress_client = authress_client
18
11
  end
19
12
  # Claim a resource by an allowed user.
20
13
  # Claim a resource by allowing a user to pick an identifier and receive admin access to that resource if it hasn't already been claimed. This only works for resources specifically marked as <strong>CLAIM</strong>. The result will be a new access record listing that user as the admin for this resource. The resourceUri will be appended to the collection resource uri using a '/' (forward slash) automatically. <br><span class=\"badge badge-outline-secondary\">RESOURCE CLAIM: {resourceUri}</span> or <span class=\"badge badge-outline-secondary\">DELEGATE *: {resourceUri}</span>
@@ -32,11 +25,11 @@ module SwaggerClient
32
25
  # @param [Hash] opts the optional parameters
33
26
  # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
34
27
  def create_claim_with_http_info(body, opts = {})
35
- if @api_client.config.debugging
36
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.create_claim ...'
28
+ if @authress_client.config.debugging
29
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.create_claim ...'
37
30
  end
38
31
  # verify the required parameter 'body' is set
39
- if @api_client.config.client_side_validation && body.nil?
32
+ if @authress_client.config.client_side_validation && body.nil?
40
33
  fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.create_claim"
41
34
  end
42
35
  # resource path
@@ -48,20 +41,20 @@ module SwaggerClient
48
41
  # header parameters
49
42
  header_params = opts[:header_params] || {}
50
43
  # HTTP header 'Accept' (if needed)
51
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
44
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
52
45
  # HTTP header 'Content-Type'
53
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
46
+ header_params['Content-Type'] = @authress_client.select_header_content_type(['application/json'])
54
47
 
55
48
  # form parameters
56
49
  form_params = opts[:form_params] || {}
57
50
 
58
51
  # http body (model)
59
- post_body = opts[:body] || @api_client.object_to_http_body(body)
52
+ post_body = opts[:body] || @authress_client.object_to_http_body(body)
60
53
 
61
54
  return_type = opts[:return_type] || 'Object'
62
55
 
63
56
  auth_names = opts[:auth_names] || ['oauth2']
64
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
57
+ data, status_code, headers = @authress_client.call_api(:POST, local_var_path,
65
58
  :header_params => header_params,
66
59
  :query_params => query_params,
67
60
  :form_params => form_params,
@@ -69,8 +62,8 @@ module SwaggerClient
69
62
  :auth_names => auth_names,
70
63
  :return_type => return_type)
71
64
 
72
- if @api_client.config.debugging
73
- @api_client.config.logger.debug "API called: AccessRecordsApi#create_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
+ if @authress_client.config.debugging
66
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#create_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
67
  end
75
68
  return data, status_code, headers
76
69
  end
@@ -90,11 +83,11 @@ module SwaggerClient
90
83
  # @param [Hash] opts the optional parameters
91
84
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
92
85
  def create_invite_with_http_info(body, opts = {})
93
- if @api_client.config.debugging
94
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.create_invite ...'
86
+ if @authress_client.config.debugging
87
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.create_invite ...'
95
88
  end
96
89
  # verify the required parameter 'body' is set
97
- if @api_client.config.client_side_validation && body.nil?
90
+ if @authress_client.config.client_side_validation && body.nil?
98
91
  fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.create_invite"
99
92
  end
100
93
  # resource path
@@ -106,18 +99,18 @@ module SwaggerClient
106
99
  # header parameters
107
100
  header_params = opts[:header_params] || {}
108
101
  # HTTP header 'Content-Type'
109
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
102
+ header_params['Content-Type'] = @authress_client.select_header_content_type(['application/json'])
110
103
 
111
104
  # form parameters
112
105
  form_params = opts[:form_params] || {}
113
106
 
114
107
  # http body (model)
115
- post_body = opts[:body] || @api_client.object_to_http_body(body)
108
+ post_body = opts[:body] || @authress_client.object_to_http_body(body)
116
109
 
117
110
  return_type = opts[:return_type]
118
111
 
119
112
  auth_names = opts[:auth_names] || ['oauth2']
120
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
113
+ data, status_code, headers = @authress_client.call_api(:POST, local_var_path,
121
114
  :header_params => header_params,
122
115
  :query_params => query_params,
123
116
  :form_params => form_params,
@@ -125,8 +118,8 @@ module SwaggerClient
125
118
  :auth_names => auth_names,
126
119
  :return_type => return_type)
127
120
 
128
- if @api_client.config.debugging
129
- @api_client.config.logger.debug "API called: AccessRecordsApi#create_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
121
+ if @authress_client.config.debugging
122
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#create_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
123
  end
131
124
  return data, status_code, headers
132
125
  end
@@ -134,7 +127,7 @@ module SwaggerClient
134
127
  # Specify user roles for specific resources. (Records have a maximum size of ~100KB) <br><span class=\"badge badge-outline-secondary\">GRANT: Existing Resource Permissions</span>
135
128
  # @param body
136
129
  # @param [Hash] opts the optional parameters
137
- # @return [InlineResponse2008]
130
+ # @return [AccessRecord]
138
131
  def create_record(body, opts = {})
139
132
  data, _status_code, _headers = create_record_with_http_info(body, opts)
140
133
  data
@@ -144,13 +137,13 @@ module SwaggerClient
144
137
  # Specify user roles for specific resources. (Records have a maximum size of ~100KB) &lt;br&gt;&lt;span class&#x3D;\&quot;badge badge-outline-secondary\&quot;&gt;GRANT: Existing Resource Permissions&lt;/span&gt;
145
138
  # @param body
146
139
  # @param [Hash] opts the optional parameters
147
- # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
140
+ # @return [Array<(AccessRecord, Integer, Hash)>] AccessRecord data, response status code and response headers
148
141
  def create_record_with_http_info(body, opts = {})
149
- if @api_client.config.debugging
150
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.create_record ...'
142
+ if @authress_client.config.debugging
143
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.create_record ...'
151
144
  end
152
145
  # verify the required parameter 'body' is set
153
- if @api_client.config.client_side_validation && body.nil?
146
+ if @authress_client.config.client_side_validation && body.nil?
154
147
  fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.create_record"
155
148
  end
156
149
  # resource path
@@ -162,20 +155,20 @@ module SwaggerClient
162
155
  # header parameters
163
156
  header_params = opts[:header_params] || {}
164
157
  # HTTP header 'Accept' (if needed)
165
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
158
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
166
159
  # HTTP header 'Content-Type'
167
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
160
+ header_params['Content-Type'] = @authress_client.select_header_content_type(['application/json'])
168
161
 
169
162
  # form parameters
170
163
  form_params = opts[:form_params] || {}
171
164
 
172
165
  # http body (model)
173
- post_body = opts[:body] || @api_client.object_to_http_body(body)
166
+ post_body = opts[:body] || @authress_client.object_to_http_body(body)
174
167
 
175
- return_type = opts[:return_type] || 'InlineResponse2008'
168
+ return_type = opts[:return_type] || 'AccessRecord'
176
169
 
177
170
  auth_names = opts[:auth_names] || ['oauth2']
178
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
171
+ data, status_code, headers = @authress_client.call_api(:POST, local_var_path,
179
172
  :header_params => header_params,
180
173
  :query_params => query_params,
181
174
  :form_params => form_params,
@@ -183,8 +176,8 @@ module SwaggerClient
183
176
  :auth_names => auth_names,
184
177
  :return_type => return_type)
185
178
 
186
- if @api_client.config.debugging
187
- @api_client.config.logger.debug "API called: AccessRecordsApi#create_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
179
+ if @authress_client.config.debugging
180
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#create_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
188
181
  end
189
182
  return data, status_code, headers
190
183
  end
@@ -204,11 +197,11 @@ module SwaggerClient
204
197
  # @param [Hash] opts the optional parameters
205
198
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
206
199
  def delete_invite_with_http_info(invite_id, opts = {})
207
- if @api_client.config.debugging
208
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.delete_invite ...'
200
+ if @authress_client.config.debugging
201
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.delete_invite ...'
209
202
  end
210
203
  # verify the required parameter 'invite_id' is set
211
- if @api_client.config.client_side_validation && invite_id.nil?
204
+ if @authress_client.config.client_side_validation && invite_id.nil?
212
205
  fail ArgumentError, "Missing the required parameter 'invite_id' when calling AccessRecordsApi.delete_invite"
213
206
  end
214
207
  # resource path
@@ -229,7 +222,7 @@ module SwaggerClient
229
222
  return_type = opts[:return_type]
230
223
 
231
224
  auth_names = opts[:auth_names] || ['oauth2']
232
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
225
+ data, status_code, headers = @authress_client.call_api(:DELETE, local_var_path,
233
226
  :header_params => header_params,
234
227
  :query_params => query_params,
235
228
  :form_params => form_params,
@@ -237,8 +230,8 @@ module SwaggerClient
237
230
  :auth_names => auth_names,
238
231
  :return_type => return_type)
239
232
 
240
- if @api_client.config.debugging
241
- @api_client.config.logger.debug "API called: AccessRecordsApi#delete_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
233
+ if @authress_client.config.debugging
234
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#delete_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
242
235
  end
243
236
  return data, status_code, headers
244
237
  end
@@ -258,11 +251,11 @@ module SwaggerClient
258
251
  # @param [Hash] opts the optional parameters
259
252
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
260
253
  def delete_record_with_http_info(record_id, opts = {})
261
- if @api_client.config.debugging
262
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.delete_record ...'
254
+ if @authress_client.config.debugging
255
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.delete_record ...'
263
256
  end
264
257
  # verify the required parameter 'record_id' is set
265
- if @api_client.config.client_side_validation && record_id.nil?
258
+ if @authress_client.config.client_side_validation && record_id.nil?
266
259
  fail ArgumentError, "Missing the required parameter 'record_id' when calling AccessRecordsApi.delete_record"
267
260
  end
268
261
  # resource path
@@ -283,7 +276,7 @@ module SwaggerClient
283
276
  return_type = opts[:return_type]
284
277
 
285
278
  auth_names = opts[:auth_names] || ['oauth2']
286
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
279
+ data, status_code, headers = @authress_client.call_api(:DELETE, local_var_path,
287
280
  :header_params => header_params,
288
281
  :query_params => query_params,
289
282
  :form_params => form_params,
@@ -291,8 +284,8 @@ module SwaggerClient
291
284
  :auth_names => auth_names,
292
285
  :return_type => return_type)
293
286
 
294
- if @api_client.config.debugging
295
- @api_client.config.logger.debug "API called: AccessRecordsApi#delete_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
287
+ if @authress_client.config.debugging
288
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#delete_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
296
289
  end
297
290
  return data, status_code, headers
298
291
  end
@@ -300,7 +293,7 @@ module SwaggerClient
300
293
  # Access records contain information assigning permissions to users for resources. <br><span class=\"badge badge-outline-secondary\">READ (or Admin): Authress:AccessRecords/{recordId}</span>
301
294
  # @param record_id The identifier of the access record.
302
295
  # @param [Hash] opts the optional parameters
303
- # @return [InlineResponse2008]
296
+ # @return [AccessRecord]
304
297
  def get_record(record_id, opts = {})
305
298
  data, _status_code, _headers = get_record_with_http_info(record_id, opts)
306
299
  data
@@ -310,13 +303,13 @@ module SwaggerClient
310
303
  # Access records contain information assigning permissions to users for resources. &lt;br&gt;&lt;span class&#x3D;\&quot;badge badge-outline-secondary\&quot;&gt;READ (or Admin): Authress:AccessRecords/{recordId}&lt;/span&gt;
311
304
  # @param record_id The identifier of the access record.
312
305
  # @param [Hash] opts the optional parameters
313
- # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
306
+ # @return [Array<(AccessRecord, Integer, Hash)>] AccessRecord data, response status code and response headers
314
307
  def get_record_with_http_info(record_id, opts = {})
315
- if @api_client.config.debugging
316
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.get_record ...'
308
+ if @authress_client.config.debugging
309
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.get_record ...'
317
310
  end
318
311
  # verify the required parameter 'record_id' is set
319
- if @api_client.config.client_side_validation && record_id.nil?
312
+ if @authress_client.config.client_side_validation && record_id.nil?
320
313
  fail ArgumentError, "Missing the required parameter 'record_id' when calling AccessRecordsApi.get_record"
321
314
  end
322
315
  # resource path
@@ -328,7 +321,7 @@ module SwaggerClient
328
321
  # header parameters
329
322
  header_params = opts[:header_params] || {}
330
323
  # HTTP header 'Accept' (if needed)
331
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
324
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
332
325
 
333
326
  # form parameters
334
327
  form_params = opts[:form_params] || {}
@@ -336,10 +329,10 @@ module SwaggerClient
336
329
  # http body (model)
337
330
  post_body = opts[:body]
338
331
 
339
- return_type = opts[:return_type] || 'InlineResponse2008'
332
+ return_type = opts[:return_type] || 'AccessRecord'
340
333
 
341
334
  auth_names = opts[:auth_names] || ['oauth2']
342
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
335
+ data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
343
336
  :header_params => header_params,
344
337
  :query_params => query_params,
345
338
  :form_params => form_params,
@@ -347,8 +340,8 @@ module SwaggerClient
347
340
  :auth_names => auth_names,
348
341
  :return_type => return_type)
349
342
 
350
- if @api_client.config.debugging
351
- @api_client.config.logger.debug "API called: AccessRecordsApi#get_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
343
+ if @authress_client.config.debugging
344
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#get_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
352
345
  end
353
346
  return data, status_code, headers
354
347
  end
@@ -374,10 +367,10 @@ module SwaggerClient
374
367
  # @option opts [String] :status Filter records by their current status.
375
368
  # @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
376
369
  def get_records_with_http_info(opts = {})
377
- if @api_client.config.debugging
378
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.get_records ...'
370
+ if @authress_client.config.debugging
371
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.get_records ...'
379
372
  end
380
- if @api_client.config.client_side_validation && opts[:'status'] && !['ACTIVE', 'DELETED'].include?(opts[:'status'])
373
+ if @authress_client.config.client_side_validation && opts[:'status'] && !['ACTIVE', 'DELETED'].include?(opts[:'status'])
381
374
  fail ArgumentError, 'invalid value for "status", must be one of ACTIVE, DELETED'
382
375
  end
383
376
  # resource path
@@ -393,7 +386,7 @@ module SwaggerClient
393
386
  # header parameters
394
387
  header_params = opts[:header_params] || {}
395
388
  # HTTP header 'Accept' (if needed)
396
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
389
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
397
390
 
398
391
  # form parameters
399
392
  form_params = opts[:form_params] || {}
@@ -404,7 +397,7 @@ module SwaggerClient
404
397
  return_type = opts[:return_type] || 'InlineResponse2007'
405
398
 
406
399
  auth_names = opts[:auth_names] || ['oauth2']
407
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
400
+ data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
408
401
  :header_params => header_params,
409
402
  :query_params => query_params,
410
403
  :form_params => form_params,
@@ -412,8 +405,8 @@ module SwaggerClient
412
405
  :auth_names => auth_names,
413
406
  :return_type => return_type)
414
407
 
415
- if @api_client.config.debugging
416
- @api_client.config.logger.debug "API called: AccessRecordsApi#get_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
408
+ if @authress_client.config.debugging
409
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#get_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
417
410
  end
418
411
  return data, status_code, headers
419
412
  end
@@ -433,11 +426,11 @@ module SwaggerClient
433
426
  # @param [Hash] opts the optional parameters
434
427
  # @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers
435
428
  def respond_to_invite_with_http_info(invite_id, opts = {})
436
- if @api_client.config.debugging
437
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.respond_to_invite ...'
429
+ if @authress_client.config.debugging
430
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.respond_to_invite ...'
438
431
  end
439
432
  # verify the required parameter 'invite_id' is set
440
- if @api_client.config.client_side_validation && invite_id.nil?
433
+ if @authress_client.config.client_side_validation && invite_id.nil?
441
434
  fail ArgumentError, "Missing the required parameter 'invite_id' when calling AccessRecordsApi.respond_to_invite"
442
435
  end
443
436
  # resource path
@@ -449,7 +442,7 @@ module SwaggerClient
449
442
  # header parameters
450
443
  header_params = opts[:header_params] || {}
451
444
  # HTTP header 'Accept' (if needed)
452
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
445
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
453
446
 
454
447
  # form parameters
455
448
  form_params = opts[:form_params] || {}
@@ -460,7 +453,7 @@ module SwaggerClient
460
453
  return_type = opts[:return_type] || 'InlineResponse2009'
461
454
 
462
455
  auth_names = opts[:auth_names] || ['oauth2']
463
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
456
+ data, status_code, headers = @authress_client.call_api(:PATCH, local_var_path,
464
457
  :header_params => header_params,
465
458
  :query_params => query_params,
466
459
  :form_params => form_params,
@@ -468,8 +461,8 @@ module SwaggerClient
468
461
  :auth_names => auth_names,
469
462
  :return_type => return_type)
470
463
 
471
- if @api_client.config.debugging
472
- @api_client.config.logger.debug "API called: AccessRecordsApi#respond_to_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
464
+ if @authress_client.config.debugging
465
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#respond_to_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
473
466
  end
474
467
  return data, status_code, headers
475
468
  end
@@ -478,7 +471,7 @@ module SwaggerClient
478
471
  # @param body
479
472
  # @param record_id The identifier of the access record.
480
473
  # @param [Hash] opts the optional parameters
481
- # @return [InlineResponse2008]
474
+ # @return [AccessRecord]
482
475
  def update_record(body, record_id, opts = {})
483
476
  data, _status_code, _headers = update_record_with_http_info(body, record_id, opts)
484
477
  data
@@ -489,17 +482,17 @@ module SwaggerClient
489
482
  # @param body
490
483
  # @param record_id The identifier of the access record.
491
484
  # @param [Hash] opts the optional parameters
492
- # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
485
+ # @return [Array<(AccessRecord, Integer, Hash)>] AccessRecord data, response status code and response headers
493
486
  def update_record_with_http_info(body, record_id, opts = {})
494
- if @api_client.config.debugging
495
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.update_record ...'
487
+ if @authress_client.config.debugging
488
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.update_record ...'
496
489
  end
497
490
  # verify the required parameter 'body' is set
498
- if @api_client.config.client_side_validation && body.nil?
491
+ if @authress_client.config.client_side_validation && body.nil?
499
492
  fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.update_record"
500
493
  end
501
494
  # verify the required parameter 'record_id' is set
502
- if @api_client.config.client_side_validation && record_id.nil?
495
+ if @authress_client.config.client_side_validation && record_id.nil?
503
496
  fail ArgumentError, "Missing the required parameter 'record_id' when calling AccessRecordsApi.update_record"
504
497
  end
505
498
  # resource path
@@ -511,20 +504,20 @@ module SwaggerClient
511
504
  # header parameters
512
505
  header_params = opts[:header_params] || {}
513
506
  # HTTP header 'Accept' (if needed)
514
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
507
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
515
508
  # HTTP header 'Content-Type'
516
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
509
+ header_params['Content-Type'] = @authress_client.select_header_content_type(['application/json'])
517
510
 
518
511
  # form parameters
519
512
  form_params = opts[:form_params] || {}
520
513
 
521
514
  # http body (model)
522
- post_body = opts[:body] || @api_client.object_to_http_body(body)
515
+ post_body = opts[:body] || @authress_client.object_to_http_body(body)
523
516
 
524
- return_type = opts[:return_type] || 'InlineResponse2008'
517
+ return_type = opts[:return_type] || 'AccessRecord'
525
518
 
526
519
  auth_names = opts[:auth_names] || ['oauth2']
527
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
520
+ data, status_code, headers = @authress_client.call_api(:PUT, local_var_path,
528
521
  :header_params => header_params,
529
522
  :query_params => query_params,
530
523
  :form_params => form_params,
@@ -532,8 +525,8 @@ module SwaggerClient
532
525
  :auth_names => auth_names,
533
526
  :return_type => return_type)
534
527
 
535
- if @api_client.config.debugging
536
- @api_client.config.logger.debug "API called: AccessRecordsApi#update_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
528
+ if @authress_client.config.debugging
529
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#update_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
537
530
  end
538
531
  return data, status_code, headers
539
532
  end