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,39 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#ORY Oathkeeper
|
5
|
+
|
6
|
+
#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.
|
7
|
+
|
8
|
+
The version of the OpenAPI document: Latest
|
9
|
+
Contact: hi@ory.am
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
OpenAPI Generator version: 4.2.2
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "ory-oathkeeper-client/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "ory-oathkeeper-client"
|
20
|
+
s.version = OryHydraClient::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["ORY GmbH"]
|
23
|
+
s.email = ["opensource@ory.sh"]
|
24
|
+
s.homepage = "https://www.ory.sh"
|
25
|
+
s.summary = "ORY Oathkeeper Ruby Gem"
|
26
|
+
s.description = "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."
|
27
|
+
s.license = 'Apache-2.0'
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
|
35
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
36
|
+
s.test_files = `find spec/*`.split("\n")
|
37
|
+
s.executables = []
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
end
|
@@ -0,0 +1,115 @@
|
|
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.1
|
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 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for OryHydraClient::ApiApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ApiApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = OryHydraClient::ApiApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ApiApi' do
|
30
|
+
it 'should create an instance of ApiApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(OryHydraClient::ApiApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for decisions
|
36
|
+
# Access Control Decision API
|
37
|
+
# > This endpoint works with all HTTP Methods (GET, POST, PUT, ...) and matches every path prefixed with /decision. This endpoint mirrors the proxy capability of ORY Oathkeeper's proxy functionality but instead of forwarding the request to the upstream server, returns 200 (request should be allowed), 401 (unauthorized), or 403 (forbidden) status codes. This endpoint can be used to integrate with other API Proxies like Ambassador, Kong, Envoy, and many more.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [nil]
|
40
|
+
describe 'decisions test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# unit tests for get_rule
|
47
|
+
# Retrieve a rule
|
48
|
+
# Use this method to retrieve a rule from the storage. If it does not exist you will receive a 404 error.
|
49
|
+
# @param id
|
50
|
+
# @param [Hash] opts the optional parameters
|
51
|
+
# @return [Rule]
|
52
|
+
describe 'get_rule test' do
|
53
|
+
it 'should work' do
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# unit tests for get_version
|
59
|
+
# Get service version
|
60
|
+
# This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
61
|
+
# @param [Hash] opts the optional parameters
|
62
|
+
# @return [Version]
|
63
|
+
describe 'get_version test' do
|
64
|
+
it 'should work' do
|
65
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# unit tests for get_well_known_json_web_keys
|
70
|
+
# Lists cryptographic keys
|
71
|
+
# This endpoint returns cryptographic keys that are required to, for example, verify signatures of ID Tokens.
|
72
|
+
# @param [Hash] opts the optional parameters
|
73
|
+
# @return [JsonWebKeySet]
|
74
|
+
describe 'get_well_known_json_web_keys test' do
|
75
|
+
it 'should work' do
|
76
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# unit tests for is_instance_alive
|
81
|
+
# Check alive status
|
82
|
+
# This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
83
|
+
# @param [Hash] opts the optional parameters
|
84
|
+
# @return [HealthStatus]
|
85
|
+
describe 'is_instance_alive test' do
|
86
|
+
it 'should work' do
|
87
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# unit tests for is_instance_ready
|
92
|
+
# Check readiness status
|
93
|
+
# This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @return [HealthStatus]
|
96
|
+
describe 'is_instance_ready test' do
|
97
|
+
it 'should work' do
|
98
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# unit tests for list_rules
|
103
|
+
# List all rules
|
104
|
+
# This method returns an array of all rules that are stored in the backend. This is useful if you want to get a full view of what rules you have currently in place.
|
105
|
+
# @param [Hash] opts the optional parameters
|
106
|
+
# @option opts [Integer] :limit The maximum amount of rules returned.
|
107
|
+
# @option opts [Integer] :offset The offset from where to start looking.
|
108
|
+
# @return [Array<Rule>]
|
109
|
+
describe 'list_rules test' do
|
110
|
+
it 'should work' do
|
111
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
end
|
@@ -0,0 +1,57 @@
|
|
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 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for OryHydraClient::HealthApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'HealthApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = OryHydraClient::HealthApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of HealthApi' do
|
30
|
+
it 'should create an instance of HealthApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(OryHydraClient::HealthApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for is_instance_alive
|
36
|
+
# Check alive status
|
37
|
+
# This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [HealthStatus]
|
40
|
+
describe 'is_instance_alive test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# unit tests for is_instance_ready
|
47
|
+
# Check readiness status
|
48
|
+
# This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
49
|
+
# @param [Hash] opts the optional parameters
|
50
|
+
# @return [HealthStatus]
|
51
|
+
describe 'is_instance_ready test' do
|
52
|
+
it 'should work' do
|
53
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
@@ -0,0 +1,46 @@
|
|
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 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for OryHydraClient::VersionApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'VersionApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = OryHydraClient::VersionApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of VersionApi' do
|
30
|
+
it 'should create an instance of VersionApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(OryHydraClient::VersionApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_version
|
36
|
+
# Get service version
|
37
|
+
# This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Version]
|
40
|
+
describe 'get_version test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,226 @@
|
|
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.1
|
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 'spec_helper'
|
14
|
+
|
15
|
+
describe OryHydraClient::ApiClient do
|
16
|
+
context 'initialization' do
|
17
|
+
context 'URL stuff' do
|
18
|
+
context 'host' do
|
19
|
+
it 'removes http from host' do
|
20
|
+
OryHydraClient.configure { |c| c.host = 'http://example.com' }
|
21
|
+
expect(OryHydraClient::Configuration.default.host).to eq('example.com')
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'removes https from host' do
|
25
|
+
OryHydraClient.configure { |c| c.host = 'https://wookiee.com' }
|
26
|
+
expect(OryHydraClient::ApiClient.default.config.host).to eq('wookiee.com')
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'removes trailing path from host' do
|
30
|
+
OryHydraClient.configure { |c| c.host = 'hobo.com/v4' }
|
31
|
+
expect(OryHydraClient::Configuration.default.host).to eq('hobo.com')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'base_path' do
|
36
|
+
it "prepends a slash to base_path" do
|
37
|
+
OryHydraClient.configure { |c| c.base_path = 'v4/dog' }
|
38
|
+
expect(OryHydraClient::Configuration.default.base_path).to eq('/v4/dog')
|
39
|
+
end
|
40
|
+
|
41
|
+
it "doesn't prepend a slash if one is already there" do
|
42
|
+
OryHydraClient.configure { |c| c.base_path = '/v4/dog' }
|
43
|
+
expect(OryHydraClient::Configuration.default.base_path).to eq('/v4/dog')
|
44
|
+
end
|
45
|
+
|
46
|
+
it "ends up as a blank string if nil" do
|
47
|
+
OryHydraClient.configure { |c| c.base_path = nil }
|
48
|
+
expect(OryHydraClient::Configuration.default.base_path).to eq('')
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe 'params_encoding in #build_request' do
|
55
|
+
let(:config) { OryHydraClient::Configuration.new }
|
56
|
+
let(:api_client) { OryHydraClient::ApiClient.new(config) }
|
57
|
+
|
58
|
+
it 'defaults to nil' do
|
59
|
+
expect(OryHydraClient::Configuration.default.params_encoding).to eq(nil)
|
60
|
+
expect(config.params_encoding).to eq(nil)
|
61
|
+
|
62
|
+
request = api_client.build_request(:get, '/test')
|
63
|
+
expect(request.options[:params_encoding]).to eq(nil)
|
64
|
+
end
|
65
|
+
|
66
|
+
it 'can be customized' do
|
67
|
+
config.params_encoding = :multi
|
68
|
+
request = api_client.build_request(:get, '/test')
|
69
|
+
expect(request.options[:params_encoding]).to eq(:multi)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe 'timeout in #build_request' do
|
74
|
+
let(:config) { OryHydraClient::Configuration.new }
|
75
|
+
let(:api_client) { OryHydraClient::ApiClient.new(config) }
|
76
|
+
|
77
|
+
it 'defaults to 0' do
|
78
|
+
expect(OryHydraClient::Configuration.default.timeout).to eq(0)
|
79
|
+
expect(config.timeout).to eq(0)
|
80
|
+
|
81
|
+
request = api_client.build_request(:get, '/test')
|
82
|
+
expect(request.options[:timeout]).to eq(0)
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'can be customized' do
|
86
|
+
config.timeout = 100
|
87
|
+
request = api_client.build_request(:get, '/test')
|
88
|
+
expect(request.options[:timeout]).to eq(100)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
describe '#deserialize' do
|
93
|
+
it "handles Array<Integer>" do
|
94
|
+
api_client = OryHydraClient::ApiClient.new
|
95
|
+
headers = { 'Content-Type' => 'application/json' }
|
96
|
+
response = double('response', headers: headers, body: '[12, 34]')
|
97
|
+
data = api_client.deserialize(response, 'Array<Integer>')
|
98
|
+
expect(data).to be_instance_of(Array)
|
99
|
+
expect(data).to eq([12, 34])
|
100
|
+
end
|
101
|
+
|
102
|
+
it 'handles Array<Array<Integer>>' do
|
103
|
+
api_client = OryHydraClient::ApiClient.new
|
104
|
+
headers = { 'Content-Type' => 'application/json' }
|
105
|
+
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
106
|
+
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
107
|
+
expect(data).to be_instance_of(Array)
|
108
|
+
expect(data).to eq([[12, 34], [56]])
|
109
|
+
end
|
110
|
+
|
111
|
+
it 'handles Hash<String, String>' do
|
112
|
+
api_client = OryHydraClient::ApiClient.new
|
113
|
+
headers = { 'Content-Type' => 'application/json' }
|
114
|
+
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
115
|
+
data = api_client.deserialize(response, 'Hash<String, String>')
|
116
|
+
expect(data).to be_instance_of(Hash)
|
117
|
+
expect(data).to eq(:message => 'Hello')
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
describe "#object_to_hash" do
|
122
|
+
it 'ignores nils and includes empty arrays' do
|
123
|
+
# uncomment below to test object_to_hash for model
|
124
|
+
# api_client = OryHydraClient::ApiClient.new
|
125
|
+
# _model = OryHydraClient::ModelName.new
|
126
|
+
# update the model attribute below
|
127
|
+
# _model.id = 1
|
128
|
+
# update the expected value (hash) below
|
129
|
+
# expected = {id: 1, name: '', tags: []}
|
130
|
+
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
describe '#build_collection_param' do
|
135
|
+
let(:param) { ['aa', 'bb', 'cc'] }
|
136
|
+
let(:api_client) { OryHydraClient::ApiClient.new }
|
137
|
+
|
138
|
+
it 'works for csv' do
|
139
|
+
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
140
|
+
end
|
141
|
+
|
142
|
+
it 'works for ssv' do
|
143
|
+
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
144
|
+
end
|
145
|
+
|
146
|
+
it 'works for tsv' do
|
147
|
+
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
148
|
+
end
|
149
|
+
|
150
|
+
it 'works for pipes' do
|
151
|
+
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
152
|
+
end
|
153
|
+
|
154
|
+
it 'works for multi' do
|
155
|
+
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
156
|
+
end
|
157
|
+
|
158
|
+
it 'fails for invalid collection format' do
|
159
|
+
expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
describe '#json_mime?' do
|
164
|
+
let(:api_client) { OryHydraClient::ApiClient.new }
|
165
|
+
|
166
|
+
it 'works' do
|
167
|
+
expect(api_client.json_mime?(nil)).to eq false
|
168
|
+
expect(api_client.json_mime?('')).to eq false
|
169
|
+
|
170
|
+
expect(api_client.json_mime?('application/json')).to eq true
|
171
|
+
expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
|
172
|
+
expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
|
173
|
+
|
174
|
+
expect(api_client.json_mime?('application/xml')).to eq false
|
175
|
+
expect(api_client.json_mime?('text/plain')).to eq false
|
176
|
+
expect(api_client.json_mime?('application/jsonp')).to eq false
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
describe '#select_header_accept' do
|
181
|
+
let(:api_client) { OryHydraClient::ApiClient.new }
|
182
|
+
|
183
|
+
it 'works' do
|
184
|
+
expect(api_client.select_header_accept(nil)).to be_nil
|
185
|
+
expect(api_client.select_header_accept([])).to be_nil
|
186
|
+
|
187
|
+
expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
|
188
|
+
expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
189
|
+
expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
190
|
+
|
191
|
+
expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
|
192
|
+
expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
describe '#select_header_content_type' do
|
197
|
+
let(:api_client) { OryHydraClient::ApiClient.new }
|
198
|
+
|
199
|
+
it 'works' do
|
200
|
+
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
201
|
+
expect(api_client.select_header_content_type([])).to eq('application/json')
|
202
|
+
|
203
|
+
expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
|
204
|
+
expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
205
|
+
expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
206
|
+
expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
|
207
|
+
expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
describe '#sanitize_filename' do
|
212
|
+
let(:api_client) { OryHydraClient::ApiClient.new }
|
213
|
+
|
214
|
+
it 'works' do
|
215
|
+
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
216
|
+
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
217
|
+
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|
218
|
+
expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
|
219
|
+
expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
|
220
|
+
expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
|
221
|
+
expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
|
222
|
+
expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
|
223
|
+
expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|