Skip to content

Commit

Permalink
Merge pull request #4 from Authress/wparad/add-users-api
Browse files Browse the repository at this point in the history
add users api
  • Loading branch information
wparad committed Jun 26, 2023
2 parents f320acc + 4573129 commit e092155
Show file tree
Hide file tree
Showing 68 changed files with 275 additions and 6,310 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ Change Log for Authress Ruby SDK:

## 2.0
* Update minimum required ruby version to 3.0
* Support Omniauth login
* Support Omniauth login
* Add UserIdentity api endpoints
* Convert inline response classes to match open api specification property names.
12 changes: 6 additions & 6 deletions lib/authress-sdk/api/access_records_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def get_record_with_http_info(record_id, opts = {})
# @option opts [String] :cursor Continuation cursor for paging (will automatically be set)
# @option opts [String] :filter Filter to search records by. This is a case insensitive search through every text field.
# @option opts [String] :status Filter records by their current status.
# @return [InlineResponse2007]
# @return [AccessRecordCollection]
def get_records(opts = {})
data, _status_code, _headers = get_records_with_http_info(opts)
data
Expand All @@ -365,7 +365,7 @@ def get_records(opts = {})
# @option opts [String] :cursor Continuation cursor for paging (will automatically be set)
# @option opts [String] :filter Filter to search records by. This is a case insensitive search through every text field.
# @option opts [String] :status Filter records by their current status.
# @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
# @return [Array<(AccessRecordCollection, Integer, Hash)>] AccessRecordCollection data, response status code and response headers
def get_records_with_http_info(opts = {})
if @authress_client.config[:debugging]
@authress_client.config[:logger].debug 'Calling API: AccessRecordsApi.get_records ...'
Expand Down Expand Up @@ -394,7 +394,7 @@ def get_records_with_http_info(opts = {})
# http body (model)
post_body = opts[:body]

return_type = opts[:return_type] || 'InlineResponse2007'
return_type = opts[:return_type] || 'AccessRecordCollection'

auth_names = opts[:auth_names] || ['oauth2']
data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
Expand All @@ -414,7 +414,7 @@ def get_records_with_http_info(opts = {})
# Accepts an invite by claiming this invite by this user. The user token used for this request will gain the permissions associated with the invite.
# @param invite_id The identifier of the invite.
# @param [Hash] opts the optional parameters
# @return [InlineResponse2009]
# @return [Account]
def respond_to_invite(invite_id, opts = {})
data, _status_code, _headers = respond_to_invite_with_http_info(invite_id, opts)
data
Expand All @@ -424,7 +424,7 @@ def respond_to_invite(invite_id, opts = {})
# Accepts an invite by claiming this invite by this user. The user token used for this request will gain the permissions associated with the invite.
# @param invite_id The identifier of the invite.
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers
# @return [Array<(Account, Integer, Hash)>] Account data, response status code and response headers
def respond_to_invite_with_http_info(invite_id, opts = {})
if @authress_client.config[:debugging]
@authress_client.config[:logger].debug 'Calling API: AccessRecordsApi.respond_to_invite ...'
Expand All @@ -450,7 +450,7 @@ def respond_to_invite_with_http_info(invite_id, opts = {})
# http body (model)
post_body = opts[:body]

return_type = opts[:return_type] || 'InlineResponse2009'
return_type = opts[:return_type] || 'Account'

auth_names = opts[:auth_names] || ['oauth2']
data, status_code, headers = @authress_client.call_api(:PATCH, local_var_path,
Expand Down
18 changes: 9 additions & 9 deletions lib/authress-sdk/api/accounts_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(authress_client = AuthressClient.default)
# Includes the original configuration information. <br><span class=\"badge badge-outline-secondary\">READ: Authress:Configuration</span>
# @param account_id The unique identifier for the account
# @param [Hash] opts the optional parameters
# @return [InlineResponse2009]
# @return [Account]
def get_account(account_id, opts = {})
data, _status_code, _headers = get_account_with_http_info(account_id, opts)
data
Expand All @@ -23,7 +23,7 @@ def get_account(account_id, opts = {})
# Includes the original configuration information. &lt;br&gt;&lt;span class&#x3D;\&quot;badge badge-outline-secondary\&quot;&gt;READ: Authress:Configuration&lt;/span&gt;
# @param account_id The unique identifier for the account
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers
# @return [Array<(Account, Integer, Hash)>] Account data, response status code and response headers
def get_account_with_http_info(account_id, opts = {})
if @authress_client.config[:debugging]
@authress_client.config[:logger].debug 'Calling API: AccountsApi.get_account ...'
Expand All @@ -49,7 +49,7 @@ def get_account_with_http_info(account_id, opts = {})
# http body (model)
post_body = opts[:body]

return_type = opts[:return_type] || 'InlineResponse2009'
return_type = opts[:return_type] || 'Account'

auth_names = opts[:auth_names] || ['oauth2']
data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
Expand All @@ -68,7 +68,7 @@ def get_account_with_http_info(account_id, opts = {})
# Get all linked identities for this account.
# Returns a list of identities linked for this account. <br><span class=\"badge badge-outline-secondary\">READ: Authress:Configuration</span>
# @param [Hash] opts the optional parameters
# @return [InlineResponse20012]
# @return [IdentityCollection]
def get_account_identities(opts = {})
data, _status_code, _headers = get_account_identities_with_http_info(opts)
data
Expand All @@ -77,7 +77,7 @@ def get_account_identities(opts = {})
# Get all linked identities for this account.
# Returns a list of identities linked for this account. &lt;br&gt;&lt;span class&#x3D;\&quot;badge badge-outline-secondary\&quot;&gt;READ: Authress:Configuration&lt;/span&gt;
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse20012, Integer, Hash)>] InlineResponse20012 data, response status code and response headers
# @return [Array<(IdentityCollection, Integer, Hash)>] IdentityCollection data, response status code and response headers
def get_account_identities_with_http_info(opts = {})
if @authress_client.config[:debugging]
@authress_client.config[:logger].debug 'Calling API: AccountsApi.get_account_identities ...'
Expand All @@ -99,7 +99,7 @@ def get_account_identities_with_http_info(opts = {})
# http body (model)
post_body = opts[:body]

return_type = opts[:return_type] || 'InlineResponse20012'
return_type = opts[:return_type] || 'IdentityCollection'

auth_names = opts[:auth_names] || ['oauth2']
data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
Expand All @@ -118,7 +118,7 @@ def get_account_identities_with_http_info(opts = {})
# Get all accounts user has access to
# Returns a list of accounts that the user has access to. <br><span class=\"badge badge-outline-secondary\">READ: Authress:Configuration</span>
# @param [Hash] opts the optional parameters
# @return [InlineResponse20011]
# @return [AccountCollection]
def get_accounts(opts = {})
data, _status_code, _headers = get_accounts_with_http_info(opts)
data
Expand All @@ -127,7 +127,7 @@ def get_accounts(opts = {})
# Get all accounts user has access to
# Returns a list of accounts that the user has access to. &lt;br&gt;&lt;span class&#x3D;\&quot;badge badge-outline-secondary\&quot;&gt;READ: Authress:Configuration&lt;/span&gt;
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse20011, Integer, Hash)>] InlineResponse20011 data, response status code and response headers
# @return [Array<(AccountCollection, Integer, Hash)>] AccountCollection data, response status code and response headers
def get_accounts_with_http_info(opts = {})
if @authress_client.config[:debugging]
@authress_client.config[:logger].debug 'Calling API: AccountsApi.get_accounts ...'
Expand All @@ -149,7 +149,7 @@ def get_accounts_with_http_info(opts = {})
# http body (model)
post_body = opts[:body]

return_type = opts[:return_type] || 'InlineResponse20011'
return_type = opts[:return_type] || 'AccountCollection'

auth_names = opts[:auth_names] || ['oauth2']
data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
Expand Down
12 changes: 6 additions & 6 deletions lib/authress-sdk/api/metadata_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def initialize(authress_client = AuthressClient.default)
# @param user_id The owner of the data.
# @param resource_uri The resource the data is attached to.
# @param [Hash] opts the optional parameters
# @return [InlineResponse2001]
# @return [MetadataObject]
def get_user_metadata(user_id, resource_uri, opts = {})
data, _status_code, _headers = get_user_metadata_with_http_info(user_id, resource_uri, opts)
data
Expand All @@ -25,7 +25,7 @@ def get_user_metadata(user_id, resource_uri, opts = {})
# @param user_id The owner of the data.
# @param resource_uri The resource the data is attached to.
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
# @return [Array<(MetadataObject, Integer, Hash)>] MetadataObject data, response status code and response headers
def get_user_metadata_with_http_info(user_id, resource_uri, opts = {})
if @authress_client.config[:debugging]
@authress_client.config[:logger].debug 'Calling API: MetadataApi.get_user_metadata ...'
Expand Down Expand Up @@ -55,7 +55,7 @@ def get_user_metadata_with_http_info(user_id, resource_uri, opts = {})
# http body (model)
post_body = opts[:body]

return_type = opts[:return_type] || 'InlineResponse2001'
return_type = opts[:return_type] || 'MetadataObject'

auth_names = opts[:auth_names] || ['oauth2']
data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
Expand All @@ -77,7 +77,7 @@ def get_user_metadata_with_http_info(user_id, resource_uri, opts = {})
# @param user_id The owner of the data.
# @param resource_uri The resource the data is attached to.
# @param [Hash] opts the optional parameters
# @return [InlineResponse2001]
# @return [MetadataObject]
def update_user_metadata(body, user_id, resource_uri, opts = {})
data, _status_code, _headers = update_user_metadata_with_http_info(body, user_id, resource_uri, opts)
data
Expand All @@ -89,7 +89,7 @@ def update_user_metadata(body, user_id, resource_uri, opts = {})
# @param user_id The owner of the data.
# @param resource_uri The resource the data is attached to.
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
# @return [Array<(MetadataObject, Integer, Hash)>] MetadataObject data, response status code and response headers
def update_user_metadata_with_http_info(body, user_id, resource_uri, opts = {})
if @authress_client.config[:debugging]
@authress_client.config[:logger].debug 'Calling API: MetadataApi.update_user_metadata ...'
Expand Down Expand Up @@ -125,7 +125,7 @@ def update_user_metadata_with_http_info(body, user_id, resource_uri, opts = {})
# http body (model)
post_body = opts[:body] || @authress_client.object_to_http_body(body)

return_type = opts[:return_type] || 'InlineResponse2001'
return_type = opts[:return_type] || 'MetadataObject'

auth_names = opts[:auth_names] || ['oauth2']
data, status_code, headers = @authress_client.call_api(:PUT, local_var_path,
Expand Down
18 changes: 9 additions & 9 deletions lib/authress-sdk/api/resource_permissions_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(authress_client = AuthressClient.default)
# Permissions can be set globally at a resource level. This will apply to all users in an account. <br><span class=\"badge badge-outline-secondary\">GRANT *: Authress:ResourcePermissions/{resourceUri}</span>
# @param resource_uri The uri path of a resource to validate, must be URL encoded, uri segments are allowed.
# @param [Hash] opts the optional parameters
# @return [InlineResponse2005]
# @return [ResourcePermission]
def get_resource_permissions(resource_uri, opts = {})
data, _status_code, _headers = get_resource_permissions_with_http_info(resource_uri, opts)
data
Expand All @@ -23,7 +23,7 @@ def get_resource_permissions(resource_uri, opts = {})
# Permissions can be set globally at a resource level. This will apply to all users in an account. &lt;br&gt;&lt;span class&#x3D;\&quot;badge badge-outline-secondary\&quot;&gt;GRANT *: Authress:ResourcePermissions/{resourceUri}&lt;/span&gt;
# @param resource_uri The uri path of a resource to validate, must be URL encoded, uri segments are allowed.
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
# @return [Array<(ResourcePermission, Integer, Hash)>] ResourcePermission data, response status code and response headers
def get_resource_permissions_with_http_info(resource_uri, opts = {})
if @authress_client.config[:debugging]
@authress_client.config[:logger].debug 'Calling API: ResourcePermissionsApi.get_resource_permissions ...'
Expand All @@ -49,7 +49,7 @@ def get_resource_permissions_with_http_info(resource_uri, opts = {})
# http body (model)
post_body = opts[:body]

return_type = opts[:return_type] || 'InlineResponse2005'
return_type = opts[:return_type] || 'ResourcePermission'

auth_names = opts[:auth_names] || ['oauth2']
data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
Expand All @@ -71,7 +71,7 @@ def get_resource_permissions_with_http_info(resource_uri, opts = {})
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit Max number of results to return (default to 20)
# @option opts [String] :cursor Continuation cursor for paging (will automatically be set)
# @return [InlineResponse2006]
# @return [ResourceUsersCollection]
def get_resource_users(resource_uri, opts = {})
data, _status_code, _headers = get_resource_users_with_http_info(resource_uri, opts)
data
Expand All @@ -83,7 +83,7 @@ def get_resource_users(resource_uri, opts = {})
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit Max number of results to return
# @option opts [String] :cursor Continuation cursor for paging (will automatically be set)
# @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
# @return [Array<(ResourceUsersCollection, Integer, Hash)>] ResourceUsersCollection data, response status code and response headers
def get_resource_users_with_http_info(resource_uri, opts = {})
if @authress_client.config[:debugging]
@authress_client.config[:logger].debug 'Calling API: ResourcePermissionsApi.get_resource_users ...'
Expand Down Expand Up @@ -111,7 +111,7 @@ def get_resource_users_with_http_info(resource_uri, opts = {})
# http body (model)
post_body = opts[:body]

return_type = opts[:return_type] || 'InlineResponse2006'
return_type = opts[:return_type] || 'ResourceUsersCollection'

auth_names = opts[:auth_names] || ['oauth2']
data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
Expand All @@ -130,7 +130,7 @@ def get_resource_users_with_http_info(resource_uri, opts = {})
# List resource configurations.
# Permissions can be set globally at a resource level. Lists any resources with a globally set resource policy. <br><span class=\"badge badge-outline-secondary\">READ: Authress:ResourcePermissions</span>
# @param [Hash] opts the optional parameters
# @return [InlineResponse2004]
# @return [ResourcePermissionCollection]
def get_resources(opts = {})
data, _status_code, _headers = get_resources_with_http_info(opts)
data
Expand All @@ -139,7 +139,7 @@ def get_resources(opts = {})
# List resource configurations.
# Permissions can be set globally at a resource level. Lists any resources with a globally set resource policy. &lt;br&gt;&lt;span class&#x3D;\&quot;badge badge-outline-secondary\&quot;&gt;READ: Authress:ResourcePermissions&lt;/span&gt;
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
# @return [Array<(ResourcePermissionCollection, Integer, Hash)>] ResourcePermissionCollection data, response status code and response headers
def get_resources_with_http_info(opts = {})
if @authress_client.config[:debugging]
@authress_client.config[:logger].debug 'Calling API: ResourcePermissionsApi.get_resources ...'
Expand All @@ -161,7 +161,7 @@ def get_resources_with_http_info(opts = {})
# http body (model)
post_body = opts[:body]

return_type = opts[:return_type] || 'InlineResponse2004'
return_type = opts[:return_type] || 'ResourcePermissionCollection'

auth_names = opts[:auth_names] || ['oauth2']
data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
Expand Down
Loading

0 comments on commit e092155

Please sign in to comment.