authress-sdk 0.1.20.0 → 1.0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +36 -32
- data/lib/authress_sdk.rb +18 -0
- data/lib/{swagger_client → authress_sdk}/api/access_records_api.rb +73 -80
- data/lib/{swagger_client → authress_sdk}/api/accounts_api.rb +31 -38
- data/lib/{swagger_client → authress_sdk}/api/metadata_api.rb +23 -30
- data/lib/{swagger_client → authress_sdk}/api/resource_permissions_api.rb +33 -40
- data/lib/{swagger_client → authress_sdk}/api/roles_api.rb +36 -43
- data/lib/{swagger_client → authress_sdk}/api/service_clients_api.rb +56 -63
- data/lib/{swagger_client → authress_sdk}/api/user_permissions_api.rb +44 -51
- data/lib/authress_sdk/api_error.rb +50 -0
- data/lib/{swagger_client/api_client.rb → authress_sdk/authress_client.rb} +36 -110
- data/lib/authress_sdk/constant_token_provider.rb +19 -0
- data/lib/{swagger_client → authress_sdk}/models/access_record.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/access_record_collection.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/access_record_collection_records.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/account.rb +4 -11
- data/lib/{swagger_client/models/inline_response_200_11.rb → authress_sdk/models/account_collection.rb} +5 -12
- data/lib/{swagger_client → authress_sdk}/models/account_collection_accounts.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_1.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_10.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_11.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_2.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_3.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_4.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_5.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_6.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_7.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_8.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/body_9.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/claim_request.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/claim_response.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/client.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/client_access_key.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/client_collection.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/client_collection_clients.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/identity.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/identity_collection.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/identity_collection_identities.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/identity_request.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_1.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_10.rb +4 -11
- data/lib/{swagger_client/models/account_collection.rb → authress_sdk/models/inline_response_200_11.rb} +5 -12
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_12.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_13.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_14.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_15.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_2.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_3.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_4.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_5.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_6.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_7.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_8.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/inline_response_200_9.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/invite.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/link.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/metadata_object.rb +4 -11
- data/lib/{swagger_client/models/v1roles_permissions.rb → authress_sdk/models/permission_object.rb} +5 -12
- data/lib/{swagger_client → authress_sdk}/models/permission_response.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/resource_permission.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection_links.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection_links_next.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection_resources.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/resource_users_collection.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/role.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/statement.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/token_request.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/user.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/user_resources.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/user_resources_resources.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/user_token.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/user_token_links.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/user_token_links_self.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/v1clients_options.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/v1records_account.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/v1records_links.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/v1records_links_self.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/v1records_users.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/v1resourcesresource_uri_permissions.rb +4 -11
- data/lib/{swagger_client/models/permission_object.rb → authress_sdk/models/v1roles_permissions.rb} +5 -12
- data/lib/{swagger_client → authress_sdk}/models/v1usersuser_idresourcesresource_urimetadata_account.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/v1usersuser_idtokens_resources.rb +4 -11
- data/lib/{swagger_client → authress_sdk}/models/v1usersuser_idtokens_statements.rb +4 -11
- data/lib/authress_sdk/service_client_token_provider.rb +18 -0
- metadata +87 -87
- data/lib/swagger_client.rb +0 -30
- data/lib/swagger_client/api_error.rb +0 -57
- data/lib/swagger_client/configuration.rb +0 -205
- data/lib/swagger_client/version.rb +0 -14
data/lib/swagger_client.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Authress
|
3
|
-
|
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
|
-
=end
|
11
|
-
|
12
|
-
Dir["#{File.expand_path(File.dirname(__FILE__))}/**/*.rb"].each{|f| require f}
|
13
|
-
|
14
|
-
module SwaggerClient
|
15
|
-
class << self
|
16
|
-
# Customize default settings for the SDK using block.
|
17
|
-
# SwaggerClient.configure do |config|
|
18
|
-
# config.username = "xxx"
|
19
|
-
# config.password = "xxx"
|
20
|
-
# end
|
21
|
-
# If no block given, return the default Configuration object.
|
22
|
-
def configure
|
23
|
-
if block_given?
|
24
|
-
yield(Configuration.default)
|
25
|
-
else
|
26
|
-
Configuration.default
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Authress
|
3
|
-
|
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
|
-
=end
|
11
|
-
|
12
|
-
module SwaggerClient
|
13
|
-
class ApiError < StandardError
|
14
|
-
attr_reader :code, :response_headers, :response_body
|
15
|
-
|
16
|
-
# Usage examples:
|
17
|
-
# ApiError.new
|
18
|
-
# ApiError.new("message")
|
19
|
-
# ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
|
20
|
-
# ApiError.new(:code => 404, :message => "Not Found")
|
21
|
-
def initialize(arg = nil)
|
22
|
-
if arg.is_a? Hash
|
23
|
-
if arg.key?(:message) || arg.key?('message')
|
24
|
-
super(arg[:message] || arg['message'])
|
25
|
-
else
|
26
|
-
super arg
|
27
|
-
end
|
28
|
-
|
29
|
-
arg.each do |k, v|
|
30
|
-
instance_variable_set "@#{k}", v
|
31
|
-
end
|
32
|
-
else
|
33
|
-
super arg
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
# Override to_s to display a friendly error message
|
38
|
-
def to_s
|
39
|
-
message
|
40
|
-
end
|
41
|
-
|
42
|
-
def message
|
43
|
-
if @message.nil?
|
44
|
-
msg = "Error message: the server returns an error"
|
45
|
-
else
|
46
|
-
msg = @message
|
47
|
-
end
|
48
|
-
|
49
|
-
msg += "\nHTTP status code: #{code}" if code
|
50
|
-
msg += "\nResponse headers: #{response_headers}" if response_headers
|
51
|
-
msg += "\nResponse body: #{response_body}" if response_body
|
52
|
-
|
53
|
-
msg
|
54
|
-
end
|
55
|
-
|
56
|
-
end
|
57
|
-
end
|
@@ -1,205 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Authress
|
3
|
-
|
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
|
-
=end
|
11
|
-
|
12
|
-
module SwaggerClient
|
13
|
-
class Configuration
|
14
|
-
# Defines url scheme
|
15
|
-
attr_accessor :scheme
|
16
|
-
|
17
|
-
# Defines url host
|
18
|
-
attr_accessor :host
|
19
|
-
|
20
|
-
# Defines url base path
|
21
|
-
attr_accessor :base_path
|
22
|
-
|
23
|
-
# Defines API keys used with API Key authentications.
|
24
|
-
#
|
25
|
-
# @return [Hash] key: parameter name, value: parameter value (API key)
|
26
|
-
#
|
27
|
-
# @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
|
28
|
-
# config.api_key['api_key'] = 'xxx'
|
29
|
-
attr_accessor :api_key
|
30
|
-
|
31
|
-
# Defines API key prefixes used with API Key authentications.
|
32
|
-
#
|
33
|
-
# @return [Hash] key: parameter name, value: API key prefix
|
34
|
-
#
|
35
|
-
# @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
|
36
|
-
# config.api_key_prefix['api_key'] = 'Token'
|
37
|
-
attr_accessor :api_key_prefix
|
38
|
-
|
39
|
-
# Defines the username used with HTTP basic authentication.
|
40
|
-
#
|
41
|
-
# @return [String]
|
42
|
-
attr_accessor :username
|
43
|
-
|
44
|
-
# Defines the password used with HTTP basic authentication.
|
45
|
-
#
|
46
|
-
# @return [String]
|
47
|
-
attr_accessor :password
|
48
|
-
|
49
|
-
# Defines the access token (Bearer) used with OAuth2.
|
50
|
-
attr_accessor :access_token
|
51
|
-
|
52
|
-
# Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
|
53
|
-
# details will be logged with `logger.debug` (see the `logger` attribute).
|
54
|
-
# Default to false.
|
55
|
-
#
|
56
|
-
# @return [true, false]
|
57
|
-
attr_accessor :debugging
|
58
|
-
|
59
|
-
# Defines the logger used for debugging.
|
60
|
-
# Default to `Rails.logger` (when in Rails) or logging to STDOUT.
|
61
|
-
#
|
62
|
-
# @return [#debug]
|
63
|
-
attr_accessor :logger
|
64
|
-
|
65
|
-
# Defines the temporary folder to store downloaded files
|
66
|
-
# (for API endpoints that have file response).
|
67
|
-
# Default to use `Tempfile`.
|
68
|
-
#
|
69
|
-
# @return [String]
|
70
|
-
attr_accessor :temp_folder_path
|
71
|
-
|
72
|
-
# The time limit for HTTP request in seconds.
|
73
|
-
# Default to 0 (never times out).
|
74
|
-
attr_accessor :timeout
|
75
|
-
|
76
|
-
# Set this to false to skip client side validation in the operation.
|
77
|
-
# Default to true.
|
78
|
-
# @return [true, false]
|
79
|
-
attr_accessor :client_side_validation
|
80
|
-
|
81
|
-
### TLS/SSL setting
|
82
|
-
# Set this to false to skip verifying SSL certificate when calling API from https server.
|
83
|
-
# Default to true.
|
84
|
-
#
|
85
|
-
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
86
|
-
#
|
87
|
-
# @return [true, false]
|
88
|
-
attr_accessor :verify_ssl
|
89
|
-
|
90
|
-
### TLS/SSL setting
|
91
|
-
# Set this to false to skip verifying SSL host name
|
92
|
-
# Default to true.
|
93
|
-
#
|
94
|
-
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
95
|
-
#
|
96
|
-
# @return [true, false]
|
97
|
-
attr_accessor :verify_ssl_host
|
98
|
-
|
99
|
-
### TLS/SSL setting
|
100
|
-
# Set this to customize the certificate file to verify the peer.
|
101
|
-
#
|
102
|
-
# @return [String] the path to the certificate file
|
103
|
-
#
|
104
|
-
# @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
|
105
|
-
# https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
|
106
|
-
attr_accessor :ssl_ca_cert
|
107
|
-
|
108
|
-
### TLS/SSL setting
|
109
|
-
# Client certificate file (for client certificate)
|
110
|
-
attr_accessor :cert_file
|
111
|
-
|
112
|
-
### TLS/SSL setting
|
113
|
-
# Client private key file (for client certificate)
|
114
|
-
attr_accessor :key_file
|
115
|
-
|
116
|
-
# Set this to customize parameters encoding of array parameter with multi collectionFormat.
|
117
|
-
# Default to nil.
|
118
|
-
#
|
119
|
-
# @see The params_encoding option of Ethon. Related source code:
|
120
|
-
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
121
|
-
attr_accessor :params_encoding
|
122
|
-
|
123
|
-
attr_accessor :inject_format
|
124
|
-
|
125
|
-
attr_accessor :force_ending_format
|
126
|
-
|
127
|
-
def initialize
|
128
|
-
@scheme = 'http'
|
129
|
-
@host = 'api.authress.io'
|
130
|
-
@base_path = '/'
|
131
|
-
@api_key = {}
|
132
|
-
@api_key_prefix = {}
|
133
|
-
@timeout = 0
|
134
|
-
@client_side_validation = true
|
135
|
-
@verify_ssl = true
|
136
|
-
@verify_ssl_host = true
|
137
|
-
@params_encoding = nil
|
138
|
-
@cert_file = nil
|
139
|
-
@key_file = nil
|
140
|
-
@debugging = false
|
141
|
-
@inject_format = false
|
142
|
-
@force_ending_format = false
|
143
|
-
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
144
|
-
|
145
|
-
yield(self) if block_given?
|
146
|
-
end
|
147
|
-
|
148
|
-
# The default Configuration object.
|
149
|
-
def self.default
|
150
|
-
@@default ||= Configuration.new
|
151
|
-
end
|
152
|
-
|
153
|
-
def configure
|
154
|
-
yield(self) if block_given?
|
155
|
-
end
|
156
|
-
|
157
|
-
def scheme=(scheme)
|
158
|
-
# remove :// from scheme
|
159
|
-
@scheme = scheme.sub(/:\/\//, '')
|
160
|
-
end
|
161
|
-
|
162
|
-
def host=(host)
|
163
|
-
# remove http(s):// and anything after a slash
|
164
|
-
@host = host.sub(/https?:\/\//, '').split('/').first
|
165
|
-
end
|
166
|
-
|
167
|
-
def base_path=(base_path)
|
168
|
-
# Add leading and trailing slashes to base_path
|
169
|
-
@base_path = "/#{base_path}".gsub(/\/+/, '/')
|
170
|
-
@base_path = '' if @base_path == '/'
|
171
|
-
end
|
172
|
-
|
173
|
-
def base_url
|
174
|
-
"#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
175
|
-
end
|
176
|
-
|
177
|
-
# Gets API key (with prefix if set).
|
178
|
-
# @param [String] param_name the parameter name of API key auth
|
179
|
-
def api_key_with_prefix(param_name)
|
180
|
-
if @api_key_prefix[param_name]
|
181
|
-
"#{@api_key_prefix[param_name]} #{@api_key[param_name]}"
|
182
|
-
else
|
183
|
-
@api_key[param_name]
|
184
|
-
end
|
185
|
-
end
|
186
|
-
|
187
|
-
# Gets Basic Auth token string
|
188
|
-
def basic_auth_token
|
189
|
-
'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
|
190
|
-
end
|
191
|
-
|
192
|
-
# Returns Auth Settings hash for api client.
|
193
|
-
def auth_settings
|
194
|
-
{
|
195
|
-
'oauth2' =>
|
196
|
-
{
|
197
|
-
type: 'bearer',
|
198
|
-
in: 'header',
|
199
|
-
key: 'Authorization',
|
200
|
-
value: "Bearer #{access_token}"
|
201
|
-
},
|
202
|
-
}
|
203
|
-
end
|
204
|
-
end
|
205
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Authress
|
3
|
-
|
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
|
-
=end
|
11
|
-
|
12
|
-
module SwaggerClient
|
13
|
-
VERSION = '1.0.0'
|
14
|
-
end
|