ory-oathkeeper-client 0.35.5.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +103 -0
- data/Rakefile +10 -0
- data/docs/ApiApi.md +195 -0
- data/docs/CreateRuleCreated.md +17 -0
- data/docs/CreateRuleForbidden.md +17 -0
- data/docs/CreateRuleForbiddenBody.md +27 -0
- data/docs/CreateRuleInternalServerError.md +17 -0
- data/docs/CreateRuleInternalServerErrorBody.md +27 -0
- data/docs/CreateRuleUnauthorized.md +17 -0
- data/docs/CreateRuleUnauthorizedBody.md +27 -0
- data/docs/DecisionsForbidden.md +17 -0
- data/docs/DecisionsForbiddenBody.md +27 -0
- data/docs/DecisionsInternalServerError.md +17 -0
- data/docs/DecisionsInternalServerErrorBody.md +27 -0
- data/docs/DecisionsNotFound.md +17 -0
- data/docs/DecisionsNotFoundBody.md +27 -0
- data/docs/DecisionsUnauthorized.md +17 -0
- data/docs/DecisionsUnauthorizedBody.md +27 -0
- data/docs/DeleteRuleForbidden.md +17 -0
- data/docs/DeleteRuleForbiddenBody.md +27 -0
- data/docs/DeleteRuleInternalServerError.md +17 -0
- data/docs/DeleteRuleInternalServerErrorBody.md +27 -0
- data/docs/DeleteRuleNotFound.md +17 -0
- data/docs/DeleteRuleNotFoundBody.md +27 -0
- data/docs/DeleteRuleUnauthorized.md +17 -0
- data/docs/DeleteRuleUnauthorizedBody.md +27 -0
- data/docs/GetRuleForbidden.md +17 -0
- data/docs/GetRuleForbiddenBody.md +27 -0
- data/docs/GetRuleInternalServerError.md +17 -0
- data/docs/GetRuleInternalServerErrorBody.md +27 -0
- data/docs/GetRuleNotFound.md +17 -0
- data/docs/GetRuleNotFoundBody.md +27 -0
- data/docs/GetRuleOK.md +17 -0
- data/docs/GetRuleUnauthorized.md +17 -0
- data/docs/GetRuleUnauthorizedBody.md +27 -0
- data/docs/GetWellKnownForbidden.md +17 -0
- data/docs/GetWellKnownForbiddenBody.md +27 -0
- data/docs/GetWellKnownJSONWebKeysInternalServerError.md +17 -0
- data/docs/GetWellKnownJSONWebKeysInternalServerErrorBody.md +27 -0
- data/docs/GetWellKnownJSONWebKeysOK.md +17 -0
- data/docs/GetWellKnownOK.md +17 -0
- data/docs/GetWellKnownUnauthorized.md +17 -0
- data/docs/GetWellKnownUnauthorizedBody.md +27 -0
- data/docs/HealthApi.md +96 -0
- data/docs/HealthNotReadyStatus.md +17 -0
- data/docs/HealthStatus.md +17 -0
- data/docs/InlineResponse500.md +27 -0
- data/docs/IsInstanceAliveInternalServerError.md +17 -0
- data/docs/IsInstanceAliveInternalServerErrorBody.md +27 -0
- data/docs/IsInstanceAliveOK.md +17 -0
- data/docs/JsonWebKey.md +49 -0
- data/docs/JsonWebKeySet.md +17 -0
- data/docs/JudgeForbidden.md +17 -0
- data/docs/JudgeForbiddenBody.md +27 -0
- data/docs/JudgeInternalServerError.md +17 -0
- data/docs/JudgeInternalServerErrorBody.md +27 -0
- data/docs/JudgeNotFound.md +17 -0
- data/docs/JudgeNotFoundBody.md +27 -0
- data/docs/JudgeUnauthorized.md +17 -0
- data/docs/JudgeUnauthorizedBody.md +27 -0
- data/docs/ListRulesForbidden.md +17 -0
- data/docs/ListRulesForbiddenBody.md +27 -0
- data/docs/ListRulesInternalServerError.md +17 -0
- data/docs/ListRulesInternalServerErrorBody.md +27 -0
- data/docs/ListRulesOK.md +17 -0
- data/docs/ListRulesUnauthorized.md +17 -0
- data/docs/ListRulesUnauthorizedBody.md +27 -0
- data/docs/Rule.md +29 -0
- data/docs/RuleHandler.md +19 -0
- data/docs/RuleMatch.md +19 -0
- data/docs/SwaggerCreateRuleParameters.md +17 -0
- data/docs/SwaggerGetRuleParameters.md +17 -0
- data/docs/SwaggerHealthStatus.md +17 -0
- data/docs/SwaggerJSONWebKey.md +49 -0
- data/docs/SwaggerJSONWebKeySet.md +17 -0
- data/docs/SwaggerListRulesParameters.md +19 -0
- data/docs/SwaggerNotReadyStatus.md +17 -0
- data/docs/SwaggerRule.md +29 -0
- data/docs/SwaggerRuleHandler.md +19 -0
- data/docs/SwaggerRuleMatch.md +19 -0
- data/docs/SwaggerRuleResponse.md +17 -0
- data/docs/SwaggerRulesResponse.md +17 -0
- data/docs/SwaggerUpdateRuleParameters.md +19 -0
- data/docs/SwaggerVersion.md +17 -0
- data/docs/UpdateRuleForbidden.md +17 -0
- data/docs/UpdateRuleForbiddenBody.md +27 -0
- data/docs/UpdateRuleInternalServerError.md +17 -0
- data/docs/UpdateRuleInternalServerErrorBody.md +27 -0
- data/docs/UpdateRuleNotFound.md +17 -0
- data/docs/UpdateRuleNotFoundBody.md +27 -0
- data/docs/UpdateRuleOK.md +17 -0
- data/docs/UpdateRuleUnauthorized.md +17 -0
- data/docs/UpdateRuleUnauthorizedBody.md +27 -0
- data/docs/Upstream.md +21 -0
- data/docs/Version.md +17 -0
- data/docs/VersionApi.md +52 -0
- data/lib/ory-oathkeeper-client.rb +52 -0
- data/lib/ory-oathkeeper-client/api/api_api.rb +258 -0
- data/lib/ory-oathkeeper-client/api/health_api.rb +134 -0
- data/lib/ory-oathkeeper-client/api/version_api.rb +78 -0
- data/lib/ory-oathkeeper-client/api_client.rb +385 -0
- data/lib/ory-oathkeeper-client/api_error.rb +57 -0
- data/lib/ory-oathkeeper-client/configuration.rb +241 -0
- data/lib/ory-oathkeeper-client/models/create_rule_created.rb +207 -0
- data/lib/ory-oathkeeper-client/models/create_rule_forbidden.rb +207 -0
- data/lib/ory-oathkeeper-client/models/create_rule_forbidden_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/create_rule_internal_server_error.rb +207 -0
- data/lib/ory-oathkeeper-client/models/create_rule_internal_server_error_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/create_rule_unauthorized.rb +207 -0
- data/lib/ory-oathkeeper-client/models/create_rule_unauthorized_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/decisions_forbidden.rb +207 -0
- data/lib/ory-oathkeeper-client/models/decisions_forbidden_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/decisions_internal_server_error.rb +207 -0
- data/lib/ory-oathkeeper-client/models/decisions_internal_server_error_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/decisions_not_found.rb +207 -0
- data/lib/ory-oathkeeper-client/models/decisions_not_found_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/decisions_unauthorized.rb +207 -0
- data/lib/ory-oathkeeper-client/models/decisions_unauthorized_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/delete_rule_forbidden.rb +207 -0
- data/lib/ory-oathkeeper-client/models/delete_rule_forbidden_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/delete_rule_internal_server_error.rb +207 -0
- data/lib/ory-oathkeeper-client/models/delete_rule_internal_server_error_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/delete_rule_not_found.rb +207 -0
- data/lib/ory-oathkeeper-client/models/delete_rule_not_found_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/delete_rule_unauthorized.rb +207 -0
- data/lib/ory-oathkeeper-client/models/delete_rule_unauthorized_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/get_rule_forbidden.rb +207 -0
- data/lib/ory-oathkeeper-client/models/get_rule_forbidden_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/get_rule_internal_server_error.rb +207 -0
- data/lib/ory-oathkeeper-client/models/get_rule_internal_server_error_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/get_rule_not_found.rb +207 -0
- data/lib/ory-oathkeeper-client/models/get_rule_not_found_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/get_rule_ok.rb +207 -0
- data/lib/ory-oathkeeper-client/models/get_rule_unauthorized.rb +207 -0
- data/lib/ory-oathkeeper-client/models/get_rule_unauthorized_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/get_well_known_forbidden.rb +207 -0
- data/lib/ory-oathkeeper-client/models/get_well_known_forbidden_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_internal_server_error.rb +207 -0
- data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_internal_server_error_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_ok.rb +207 -0
- data/lib/ory-oathkeeper-client/models/get_well_known_ok.rb +207 -0
- data/lib/ory-oathkeeper-client/models/get_well_known_unauthorized.rb +207 -0
- data/lib/ory-oathkeeper-client/models/get_well_known_unauthorized_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/health_not_ready_status.rb +209 -0
- data/lib/ory-oathkeeper-client/models/health_status.rb +207 -0
- data/lib/ory-oathkeeper-client/models/inline_response500.rb +253 -0
- data/lib/ory-oathkeeper-client/models/is_instance_alive_internal_server_error.rb +207 -0
- data/lib/ory-oathkeeper-client/models/is_instance_alive_internal_server_error_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/is_instance_alive_ok.rb +207 -0
- data/lib/ory-oathkeeper-client/models/json_web_key.rb +357 -0
- data/lib/ory-oathkeeper-client/models/json_web_key_set.rb +209 -0
- data/lib/ory-oathkeeper-client/models/judge_forbidden.rb +207 -0
- data/lib/ory-oathkeeper-client/models/judge_forbidden_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/judge_internal_server_error.rb +207 -0
- data/lib/ory-oathkeeper-client/models/judge_internal_server_error_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/judge_not_found.rb +207 -0
- data/lib/ory-oathkeeper-client/models/judge_not_found_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/judge_unauthorized.rb +207 -0
- data/lib/ory-oathkeeper-client/models/judge_unauthorized_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/list_rules_forbidden.rb +207 -0
- data/lib/ory-oathkeeper-client/models/list_rules_forbidden_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/list_rules_internal_server_error.rb +207 -0
- data/lib/ory-oathkeeper-client/models/list_rules_internal_server_error_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/list_rules_ok.rb +210 -0
- data/lib/ory-oathkeeper-client/models/list_rules_unauthorized.rb +207 -0
- data/lib/ory-oathkeeper-client/models/list_rules_unauthorized_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/rule.rb +268 -0
- data/lib/ory-oathkeeper-client/models/rule_handler.rb +217 -0
- data/lib/ory-oathkeeper-client/models/rule_match.rb +219 -0
- data/lib/ory-oathkeeper-client/models/swagger_create_rule_parameters.rb +207 -0
- data/lib/ory-oathkeeper-client/models/swagger_get_rule_parameters.rb +213 -0
- data/lib/ory-oathkeeper-client/models/swagger_health_status.rb +208 -0
- data/lib/ory-oathkeeper-client/models/swagger_json_web_key.rb +370 -0
- data/lib/ory-oathkeeper-client/models/swagger_json_web_key_set.rb +210 -0
- data/lib/ory-oathkeeper-client/models/swagger_list_rules_parameters.rb +218 -0
- data/lib/ory-oathkeeper-client/models/swagger_not_ready_status.rb +210 -0
- data/lib/ory-oathkeeper-client/models/swagger_rule.rb +268 -0
- data/lib/ory-oathkeeper-client/models/swagger_rule_handler.rb +218 -0
- data/lib/ory-oathkeeper-client/models/swagger_rule_match.rb +220 -0
- data/lib/ory-oathkeeper-client/models/swagger_rule_response.rb +207 -0
- data/lib/ory-oathkeeper-client/models/swagger_rules_response.rb +210 -0
- data/lib/ory-oathkeeper-client/models/swagger_update_rule_parameters.rb +222 -0
- data/lib/ory-oathkeeper-client/models/swagger_version.rb +208 -0
- data/lib/ory-oathkeeper-client/models/update_rule_forbidden.rb +207 -0
- data/lib/ory-oathkeeper-client/models/update_rule_forbidden_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/update_rule_internal_server_error.rb +207 -0
- data/lib/ory-oathkeeper-client/models/update_rule_internal_server_error_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/update_rule_not_found.rb +207 -0
- data/lib/ory-oathkeeper-client/models/update_rule_not_found_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/update_rule_ok.rb +207 -0
- data/lib/ory-oathkeeper-client/models/update_rule_unauthorized.rb +207 -0
- data/lib/ory-oathkeeper-client/models/update_rule_unauthorized_body.rb +260 -0
- data/lib/ory-oathkeeper-client/models/upstream.rb +227 -0
- data/lib/ory-oathkeeper-client/models/version.rb +207 -0
- data/lib/ory-oathkeeper-client/version.rb +15 -0
- data/ory-oathkeeper-client.gemspec +39 -0
- data/spec/api/api_api_spec.rb +115 -0
- data/spec/api/health_api_spec.rb +57 -0
- data/spec/api/version_api_spec.rb +46 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/create_rule_created_spec.rb +41 -0
- data/spec/models/create_rule_forbidden_body_spec.rb +71 -0
- data/spec/models/create_rule_forbidden_spec.rb +41 -0
- data/spec/models/create_rule_internal_server_error_body_spec.rb +71 -0
- data/spec/models/create_rule_internal_server_error_spec.rb +41 -0
- data/spec/models/create_rule_unauthorized_body_spec.rb +71 -0
- data/spec/models/create_rule_unauthorized_spec.rb +41 -0
- data/spec/models/decisions_forbidden_body_spec.rb +71 -0
- data/spec/models/decisions_forbidden_spec.rb +41 -0
- data/spec/models/decisions_internal_server_error_body_spec.rb +71 -0
- data/spec/models/decisions_internal_server_error_spec.rb +41 -0
- data/spec/models/decisions_not_found_body_spec.rb +71 -0
- data/spec/models/decisions_not_found_spec.rb +41 -0
- data/spec/models/decisions_unauthorized_body_spec.rb +71 -0
- data/spec/models/decisions_unauthorized_spec.rb +41 -0
- data/spec/models/delete_rule_forbidden_body_spec.rb +71 -0
- data/spec/models/delete_rule_forbidden_spec.rb +41 -0
- data/spec/models/delete_rule_internal_server_error_body_spec.rb +71 -0
- data/spec/models/delete_rule_internal_server_error_spec.rb +41 -0
- data/spec/models/delete_rule_not_found_body_spec.rb +71 -0
- data/spec/models/delete_rule_not_found_spec.rb +41 -0
- data/spec/models/delete_rule_unauthorized_body_spec.rb +71 -0
- data/spec/models/delete_rule_unauthorized_spec.rb +41 -0
- data/spec/models/get_rule_forbidden_body_spec.rb +71 -0
- data/spec/models/get_rule_forbidden_spec.rb +41 -0
- data/spec/models/get_rule_internal_server_error_body_spec.rb +71 -0
- data/spec/models/get_rule_internal_server_error_spec.rb +41 -0
- data/spec/models/get_rule_not_found_body_spec.rb +71 -0
- data/spec/models/get_rule_not_found_spec.rb +41 -0
- data/spec/models/get_rule_ok_spec.rb +41 -0
- data/spec/models/get_rule_unauthorized_body_spec.rb +71 -0
- data/spec/models/get_rule_unauthorized_spec.rb +41 -0
- data/spec/models/get_well_known_forbidden_body_spec.rb +71 -0
- data/spec/models/get_well_known_forbidden_spec.rb +41 -0
- data/spec/models/get_well_known_json_web_keys_internal_server_error_body_spec.rb +71 -0
- data/spec/models/get_well_known_json_web_keys_internal_server_error_spec.rb +41 -0
- data/spec/models/get_well_known_json_web_keys_ok_spec.rb +41 -0
- data/spec/models/get_well_known_ok_spec.rb +41 -0
- data/spec/models/get_well_known_unauthorized_body_spec.rb +71 -0
- data/spec/models/get_well_known_unauthorized_spec.rb +41 -0
- data/spec/models/health_not_ready_status_spec.rb +41 -0
- data/spec/models/health_status_spec.rb +41 -0
- data/spec/models/inline_response500_spec.rb +71 -0
- data/spec/models/is_instance_alive_internal_server_error_body_spec.rb +71 -0
- data/spec/models/is_instance_alive_internal_server_error_spec.rb +41 -0
- data/spec/models/is_instance_alive_ok_spec.rb +41 -0
- data/spec/models/json_web_key_set_spec.rb +41 -0
- data/spec/models/json_web_key_spec.rb +137 -0
- data/spec/models/judge_forbidden_body_spec.rb +71 -0
- data/spec/models/judge_forbidden_spec.rb +41 -0
- data/spec/models/judge_internal_server_error_body_spec.rb +71 -0
- data/spec/models/judge_internal_server_error_spec.rb +41 -0
- data/spec/models/judge_not_found_body_spec.rb +71 -0
- data/spec/models/judge_not_found_spec.rb +41 -0
- data/spec/models/judge_unauthorized_body_spec.rb +71 -0
- data/spec/models/judge_unauthorized_spec.rb +41 -0
- data/spec/models/list_rules_forbidden_body_spec.rb +71 -0
- data/spec/models/list_rules_forbidden_spec.rb +41 -0
- data/spec/models/list_rules_internal_server_error_body_spec.rb +71 -0
- data/spec/models/list_rules_internal_server_error_spec.rb +41 -0
- data/spec/models/list_rules_ok_spec.rb +41 -0
- data/spec/models/list_rules_unauthorized_body_spec.rb +71 -0
- data/spec/models/list_rules_unauthorized_spec.rb +41 -0
- data/spec/models/rule_handler_spec.rb +47 -0
- data/spec/models/rule_match_spec.rb +47 -0
- data/spec/models/rule_spec.rb +77 -0
- data/spec/models/swagger_create_rule_parameters_spec.rb +41 -0
- data/spec/models/swagger_get_rule_parameters_spec.rb +41 -0
- data/spec/models/swagger_health_status_spec.rb +41 -0
- data/spec/models/swagger_json_web_key_set_spec.rb +41 -0
- data/spec/models/swagger_json_web_key_spec.rb +137 -0
- data/spec/models/swagger_list_rules_parameters_spec.rb +47 -0
- data/spec/models/swagger_not_ready_status_spec.rb +41 -0
- data/spec/models/swagger_rule_handler_spec.rb +47 -0
- data/spec/models/swagger_rule_match_spec.rb +47 -0
- data/spec/models/swagger_rule_response_spec.rb +41 -0
- data/spec/models/swagger_rule_spec.rb +77 -0
- data/spec/models/swagger_rules_response_spec.rb +41 -0
- data/spec/models/swagger_update_rule_parameters_spec.rb +47 -0
- data/spec/models/swagger_version_spec.rb +41 -0
- data/spec/models/update_rule_forbidden_body_spec.rb +71 -0
- data/spec/models/update_rule_forbidden_spec.rb +41 -0
- data/spec/models/update_rule_internal_server_error_body_spec.rb +71 -0
- data/spec/models/update_rule_internal_server_error_spec.rb +41 -0
- data/spec/models/update_rule_not_found_body_spec.rb +71 -0
- data/spec/models/update_rule_not_found_spec.rb +41 -0
- data/spec/models/update_rule_ok_spec.rb +41 -0
- data/spec/models/update_rule_unauthorized_body_spec.rb +71 -0
- data/spec/models/update_rule_unauthorized_spec.rb +41 -0
- data/spec/models/upstream_spec.rb +53 -0
- data/spec/models/version_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +497 -0
@@ -0,0 +1,207 @@
|
|
1
|
+
=begin
|
2
|
+
#ORY Oathkeeper
|
3
|
+
|
4
|
+
#ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.0.0-alpha.37
|
7
|
+
Contact: hi@ory.am
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.2
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module OryHydraClient
|
16
|
+
# healthStatus
|
17
|
+
class IsInstanceAliveOK
|
18
|
+
attr_accessor :payload
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'payload' => :'Payload'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.openapi_types
|
29
|
+
{
|
30
|
+
:'payload' => :'SwaggerHealthStatus'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# List of attributes with nullable: true
|
35
|
+
def self.openapi_nullable
|
36
|
+
Set.new([
|
37
|
+
])
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
if (!attributes.is_a?(Hash))
|
44
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::IsInstanceAliveOK` initialize method"
|
45
|
+
end
|
46
|
+
|
47
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
48
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
49
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
50
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::IsInstanceAliveOK`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
51
|
+
end
|
52
|
+
h[k.to_sym] = v
|
53
|
+
}
|
54
|
+
|
55
|
+
if attributes.key?(:'payload')
|
56
|
+
self.payload = attributes[:'payload']
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
61
|
+
# @return Array for valid properties with the reasons
|
62
|
+
def list_invalid_properties
|
63
|
+
invalid_properties = Array.new
|
64
|
+
invalid_properties
|
65
|
+
end
|
66
|
+
|
67
|
+
# Check to see if the all the properties in the model are valid
|
68
|
+
# @return true if the model is valid
|
69
|
+
def valid?
|
70
|
+
true
|
71
|
+
end
|
72
|
+
|
73
|
+
# Checks equality by comparing each attribute.
|
74
|
+
# @param [Object] Object to be compared
|
75
|
+
def ==(o)
|
76
|
+
return true if self.equal?(o)
|
77
|
+
self.class == o.class &&
|
78
|
+
payload == o.payload
|
79
|
+
end
|
80
|
+
|
81
|
+
# @see the `==` method
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def eql?(o)
|
84
|
+
self == o
|
85
|
+
end
|
86
|
+
|
87
|
+
# Calculates hash code according to all attributes.
|
88
|
+
# @return [Integer] Hash code
|
89
|
+
def hash
|
90
|
+
[payload].hash
|
91
|
+
end
|
92
|
+
|
93
|
+
# Builds the object from hash
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
+
# @return [Object] Returns the model itself
|
96
|
+
def self.build_from_hash(attributes)
|
97
|
+
new.build_from_hash(attributes)
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def build_from_hash(attributes)
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
105
|
+
self.class.openapi_types.each_pair do |key, type|
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
111
|
+
end
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
# Deserializes the data based on type
|
121
|
+
# @param string type Data type
|
122
|
+
# @param string value Value to be deserialized
|
123
|
+
# @return [Object] Deserialized data
|
124
|
+
def _deserialize(type, value)
|
125
|
+
case type.to_sym
|
126
|
+
when :DateTime
|
127
|
+
DateTime.parse(value)
|
128
|
+
when :Date
|
129
|
+
Date.parse(value)
|
130
|
+
when :String
|
131
|
+
value.to_s
|
132
|
+
when :Integer
|
133
|
+
value.to_i
|
134
|
+
when :Float
|
135
|
+
value.to_f
|
136
|
+
when :Boolean
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
138
|
+
true
|
139
|
+
else
|
140
|
+
false
|
141
|
+
end
|
142
|
+
when :Object
|
143
|
+
# generic object (usually a Hash), return directly
|
144
|
+
value
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
151
|
+
{}.tap do |hash|
|
152
|
+
value.each do |k, v|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
else # model
|
157
|
+
OryHydraClient.const_get(type).build_from_hash(value)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the string representation of the object
|
162
|
+
# @return [String] String presentation of the object
|
163
|
+
def to_s
|
164
|
+
to_hash.to_s
|
165
|
+
end
|
166
|
+
|
167
|
+
# to_body is an alias to to_hash (backward compatibility)
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
169
|
+
def to_body
|
170
|
+
to_hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the object in the form of hash
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_hash
|
176
|
+
hash = {}
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
178
|
+
value = self.send(attr)
|
179
|
+
if value.nil?
|
180
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
181
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
182
|
+
end
|
183
|
+
|
184
|
+
hash[param] = _to_hash(value)
|
185
|
+
end
|
186
|
+
hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Outputs non-array value in the form of hash
|
190
|
+
# For object, use to_hash. Otherwise, just return the value
|
191
|
+
# @param [Object] value Any valid value
|
192
|
+
# @return [Hash] Returns the value in the form of hash
|
193
|
+
def _to_hash(value)
|
194
|
+
if value.is_a?(Array)
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
196
|
+
elsif value.is_a?(Hash)
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
+
end
|
200
|
+
elsif value.respond_to? :to_hash
|
201
|
+
value.to_hash
|
202
|
+
else
|
203
|
+
value
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
@@ -0,0 +1,357 @@
|
|
1
|
+
=begin
|
2
|
+
#ORY Oathkeeper
|
3
|
+
|
4
|
+
#ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: Latest
|
7
|
+
Contact: hi@ory.am
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.2
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module OryHydraClient
|
16
|
+
class JsonWebKey
|
17
|
+
# The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name.
|
18
|
+
attr_accessor :alg
|
19
|
+
|
20
|
+
attr_accessor :crv
|
21
|
+
|
22
|
+
attr_accessor :d
|
23
|
+
|
24
|
+
attr_accessor :dp
|
25
|
+
|
26
|
+
attr_accessor :dq
|
27
|
+
|
28
|
+
attr_accessor :e
|
29
|
+
|
30
|
+
attr_accessor :k
|
31
|
+
|
32
|
+
# The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string.
|
33
|
+
attr_accessor :kid
|
34
|
+
|
35
|
+
# The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string.
|
36
|
+
attr_accessor :kty
|
37
|
+
|
38
|
+
attr_accessor :n
|
39
|
+
|
40
|
+
attr_accessor :p
|
41
|
+
|
42
|
+
attr_accessor :q
|
43
|
+
|
44
|
+
attr_accessor :qi
|
45
|
+
|
46
|
+
# The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).
|
47
|
+
attr_accessor :use
|
48
|
+
|
49
|
+
attr_accessor :x
|
50
|
+
|
51
|
+
# The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.
|
52
|
+
attr_accessor :x5c
|
53
|
+
|
54
|
+
attr_accessor :y
|
55
|
+
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
57
|
+
def self.attribute_map
|
58
|
+
{
|
59
|
+
:'alg' => :'alg',
|
60
|
+
:'crv' => :'crv',
|
61
|
+
:'d' => :'d',
|
62
|
+
:'dp' => :'dp',
|
63
|
+
:'dq' => :'dq',
|
64
|
+
:'e' => :'e',
|
65
|
+
:'k' => :'k',
|
66
|
+
:'kid' => :'kid',
|
67
|
+
:'kty' => :'kty',
|
68
|
+
:'n' => :'n',
|
69
|
+
:'p' => :'p',
|
70
|
+
:'q' => :'q',
|
71
|
+
:'qi' => :'qi',
|
72
|
+
:'use' => :'use',
|
73
|
+
:'x' => :'x',
|
74
|
+
:'x5c' => :'x5c',
|
75
|
+
:'y' => :'y'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# Attribute type mapping.
|
80
|
+
def self.openapi_types
|
81
|
+
{
|
82
|
+
:'alg' => :'String',
|
83
|
+
:'crv' => :'String',
|
84
|
+
:'d' => :'String',
|
85
|
+
:'dp' => :'String',
|
86
|
+
:'dq' => :'String',
|
87
|
+
:'e' => :'String',
|
88
|
+
:'k' => :'String',
|
89
|
+
:'kid' => :'String',
|
90
|
+
:'kty' => :'String',
|
91
|
+
:'n' => :'String',
|
92
|
+
:'p' => :'String',
|
93
|
+
:'q' => :'String',
|
94
|
+
:'qi' => :'String',
|
95
|
+
:'use' => :'String',
|
96
|
+
:'x' => :'String',
|
97
|
+
:'x5c' => :'Array<String>',
|
98
|
+
:'y' => :'String'
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
# List of attributes with nullable: true
|
103
|
+
def self.openapi_nullable
|
104
|
+
Set.new([
|
105
|
+
])
|
106
|
+
end
|
107
|
+
|
108
|
+
# Initializes the object
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
def initialize(attributes = {})
|
111
|
+
if (!attributes.is_a?(Hash))
|
112
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::JsonWebKey` initialize method"
|
113
|
+
end
|
114
|
+
|
115
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
116
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
117
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::JsonWebKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
119
|
+
end
|
120
|
+
h[k.to_sym] = v
|
121
|
+
}
|
122
|
+
|
123
|
+
if attributes.key?(:'alg')
|
124
|
+
self.alg = attributes[:'alg']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'crv')
|
128
|
+
self.crv = attributes[:'crv']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'d')
|
132
|
+
self.d = attributes[:'d']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'dp')
|
136
|
+
self.dp = attributes[:'dp']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'dq')
|
140
|
+
self.dq = attributes[:'dq']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'e')
|
144
|
+
self.e = attributes[:'e']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.key?(:'k')
|
148
|
+
self.k = attributes[:'k']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.key?(:'kid')
|
152
|
+
self.kid = attributes[:'kid']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.key?(:'kty')
|
156
|
+
self.kty = attributes[:'kty']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'n')
|
160
|
+
self.n = attributes[:'n']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.key?(:'p')
|
164
|
+
self.p = attributes[:'p']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.key?(:'q')
|
168
|
+
self.q = attributes[:'q']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.key?(:'qi')
|
172
|
+
self.qi = attributes[:'qi']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.key?(:'use')
|
176
|
+
self.use = attributes[:'use']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.key?(:'x')
|
180
|
+
self.x = attributes[:'x']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.key?(:'x5c')
|
184
|
+
if (value = attributes[:'x5c']).is_a?(Array)
|
185
|
+
self.x5c = value
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes.key?(:'y')
|
190
|
+
self.y = attributes[:'y']
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
195
|
+
# @return Array for valid properties with the reasons
|
196
|
+
def list_invalid_properties
|
197
|
+
invalid_properties = Array.new
|
198
|
+
invalid_properties
|
199
|
+
end
|
200
|
+
|
201
|
+
# Check to see if the all the properties in the model are valid
|
202
|
+
# @return true if the model is valid
|
203
|
+
def valid?
|
204
|
+
true
|
205
|
+
end
|
206
|
+
|
207
|
+
# Checks equality by comparing each attribute.
|
208
|
+
# @param [Object] Object to be compared
|
209
|
+
def ==(o)
|
210
|
+
return true if self.equal?(o)
|
211
|
+
self.class == o.class &&
|
212
|
+
alg == o.alg &&
|
213
|
+
crv == o.crv &&
|
214
|
+
d == o.d &&
|
215
|
+
dp == o.dp &&
|
216
|
+
dq == o.dq &&
|
217
|
+
e == o.e &&
|
218
|
+
k == o.k &&
|
219
|
+
kid == o.kid &&
|
220
|
+
kty == o.kty &&
|
221
|
+
n == o.n &&
|
222
|
+
p == o.p &&
|
223
|
+
q == o.q &&
|
224
|
+
qi == o.qi &&
|
225
|
+
use == o.use &&
|
226
|
+
x == o.x &&
|
227
|
+
x5c == o.x5c &&
|
228
|
+
y == o.y
|
229
|
+
end
|
230
|
+
|
231
|
+
# @see the `==` method
|
232
|
+
# @param [Object] Object to be compared
|
233
|
+
def eql?(o)
|
234
|
+
self == o
|
235
|
+
end
|
236
|
+
|
237
|
+
# Calculates hash code according to all attributes.
|
238
|
+
# @return [Integer] Hash code
|
239
|
+
def hash
|
240
|
+
[alg, crv, d, dp, dq, e, k, kid, kty, n, p, q, qi, use, x, x5c, y].hash
|
241
|
+
end
|
242
|
+
|
243
|
+
# Builds the object from hash
|
244
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
245
|
+
# @return [Object] Returns the model itself
|
246
|
+
def self.build_from_hash(attributes)
|
247
|
+
new.build_from_hash(attributes)
|
248
|
+
end
|
249
|
+
|
250
|
+
# Builds the object from hash
|
251
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
252
|
+
# @return [Object] Returns the model itself
|
253
|
+
def build_from_hash(attributes)
|
254
|
+
return nil unless attributes.is_a?(Hash)
|
255
|
+
self.class.openapi_types.each_pair do |key, type|
|
256
|
+
if type =~ /\AArray<(.*)>/i
|
257
|
+
# check to ensure the input is an array given that the attribute
|
258
|
+
# is documented as an array but the input is not
|
259
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
260
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
261
|
+
end
|
262
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
263
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
264
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
265
|
+
end
|
266
|
+
|
267
|
+
self
|
268
|
+
end
|
269
|
+
|
270
|
+
# Deserializes the data based on type
|
271
|
+
# @param string type Data type
|
272
|
+
# @param string value Value to be deserialized
|
273
|
+
# @return [Object] Deserialized data
|
274
|
+
def _deserialize(type, value)
|
275
|
+
case type.to_sym
|
276
|
+
when :DateTime
|
277
|
+
DateTime.parse(value)
|
278
|
+
when :Date
|
279
|
+
Date.parse(value)
|
280
|
+
when :String
|
281
|
+
value.to_s
|
282
|
+
when :Integer
|
283
|
+
value.to_i
|
284
|
+
when :Float
|
285
|
+
value.to_f
|
286
|
+
when :Boolean
|
287
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
288
|
+
true
|
289
|
+
else
|
290
|
+
false
|
291
|
+
end
|
292
|
+
when :Object
|
293
|
+
# generic object (usually a Hash), return directly
|
294
|
+
value
|
295
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
296
|
+
inner_type = Regexp.last_match[:inner_type]
|
297
|
+
value.map { |v| _deserialize(inner_type, v) }
|
298
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
299
|
+
k_type = Regexp.last_match[:k_type]
|
300
|
+
v_type = Regexp.last_match[:v_type]
|
301
|
+
{}.tap do |hash|
|
302
|
+
value.each do |k, v|
|
303
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
304
|
+
end
|
305
|
+
end
|
306
|
+
else # model
|
307
|
+
OryHydraClient.const_get(type).build_from_hash(value)
|
308
|
+
end
|
309
|
+
end
|
310
|
+
|
311
|
+
# Returns the string representation of the object
|
312
|
+
# @return [String] String presentation of the object
|
313
|
+
def to_s
|
314
|
+
to_hash.to_s
|
315
|
+
end
|
316
|
+
|
317
|
+
# to_body is an alias to to_hash (backward compatibility)
|
318
|
+
# @return [Hash] Returns the object in the form of hash
|
319
|
+
def to_body
|
320
|
+
to_hash
|
321
|
+
end
|
322
|
+
|
323
|
+
# Returns the object in the form of hash
|
324
|
+
# @return [Hash] Returns the object in the form of hash
|
325
|
+
def to_hash
|
326
|
+
hash = {}
|
327
|
+
self.class.attribute_map.each_pair do |attr, param|
|
328
|
+
value = self.send(attr)
|
329
|
+
if value.nil?
|
330
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
331
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
332
|
+
end
|
333
|
+
|
334
|
+
hash[param] = _to_hash(value)
|
335
|
+
end
|
336
|
+
hash
|
337
|
+
end
|
338
|
+
|
339
|
+
# Outputs non-array value in the form of hash
|
340
|
+
# For object, use to_hash. Otherwise, just return the value
|
341
|
+
# @param [Object] value Any valid value
|
342
|
+
# @return [Hash] Returns the value in the form of hash
|
343
|
+
def _to_hash(value)
|
344
|
+
if value.is_a?(Array)
|
345
|
+
value.compact.map { |v| _to_hash(v) }
|
346
|
+
elsif value.is_a?(Hash)
|
347
|
+
{}.tap do |hash|
|
348
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
349
|
+
end
|
350
|
+
elsif value.respond_to? :to_hash
|
351
|
+
value.to_hash
|
352
|
+
else
|
353
|
+
value
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
357
|
+
end
|