ory-oathkeeper-client 0.35.5.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +103 -0
  4. data/Rakefile +10 -0
  5. data/docs/ApiApi.md +195 -0
  6. data/docs/CreateRuleCreated.md +17 -0
  7. data/docs/CreateRuleForbidden.md +17 -0
  8. data/docs/CreateRuleForbiddenBody.md +27 -0
  9. data/docs/CreateRuleInternalServerError.md +17 -0
  10. data/docs/CreateRuleInternalServerErrorBody.md +27 -0
  11. data/docs/CreateRuleUnauthorized.md +17 -0
  12. data/docs/CreateRuleUnauthorizedBody.md +27 -0
  13. data/docs/DecisionsForbidden.md +17 -0
  14. data/docs/DecisionsForbiddenBody.md +27 -0
  15. data/docs/DecisionsInternalServerError.md +17 -0
  16. data/docs/DecisionsInternalServerErrorBody.md +27 -0
  17. data/docs/DecisionsNotFound.md +17 -0
  18. data/docs/DecisionsNotFoundBody.md +27 -0
  19. data/docs/DecisionsUnauthorized.md +17 -0
  20. data/docs/DecisionsUnauthorizedBody.md +27 -0
  21. data/docs/DeleteRuleForbidden.md +17 -0
  22. data/docs/DeleteRuleForbiddenBody.md +27 -0
  23. data/docs/DeleteRuleInternalServerError.md +17 -0
  24. data/docs/DeleteRuleInternalServerErrorBody.md +27 -0
  25. data/docs/DeleteRuleNotFound.md +17 -0
  26. data/docs/DeleteRuleNotFoundBody.md +27 -0
  27. data/docs/DeleteRuleUnauthorized.md +17 -0
  28. data/docs/DeleteRuleUnauthorizedBody.md +27 -0
  29. data/docs/GetRuleForbidden.md +17 -0
  30. data/docs/GetRuleForbiddenBody.md +27 -0
  31. data/docs/GetRuleInternalServerError.md +17 -0
  32. data/docs/GetRuleInternalServerErrorBody.md +27 -0
  33. data/docs/GetRuleNotFound.md +17 -0
  34. data/docs/GetRuleNotFoundBody.md +27 -0
  35. data/docs/GetRuleOK.md +17 -0
  36. data/docs/GetRuleUnauthorized.md +17 -0
  37. data/docs/GetRuleUnauthorizedBody.md +27 -0
  38. data/docs/GetWellKnownForbidden.md +17 -0
  39. data/docs/GetWellKnownForbiddenBody.md +27 -0
  40. data/docs/GetWellKnownJSONWebKeysInternalServerError.md +17 -0
  41. data/docs/GetWellKnownJSONWebKeysInternalServerErrorBody.md +27 -0
  42. data/docs/GetWellKnownJSONWebKeysOK.md +17 -0
  43. data/docs/GetWellKnownOK.md +17 -0
  44. data/docs/GetWellKnownUnauthorized.md +17 -0
  45. data/docs/GetWellKnownUnauthorizedBody.md +27 -0
  46. data/docs/HealthApi.md +96 -0
  47. data/docs/HealthNotReadyStatus.md +17 -0
  48. data/docs/HealthStatus.md +17 -0
  49. data/docs/InlineResponse500.md +27 -0
  50. data/docs/IsInstanceAliveInternalServerError.md +17 -0
  51. data/docs/IsInstanceAliveInternalServerErrorBody.md +27 -0
  52. data/docs/IsInstanceAliveOK.md +17 -0
  53. data/docs/JsonWebKey.md +49 -0
  54. data/docs/JsonWebKeySet.md +17 -0
  55. data/docs/JudgeForbidden.md +17 -0
  56. data/docs/JudgeForbiddenBody.md +27 -0
  57. data/docs/JudgeInternalServerError.md +17 -0
  58. data/docs/JudgeInternalServerErrorBody.md +27 -0
  59. data/docs/JudgeNotFound.md +17 -0
  60. data/docs/JudgeNotFoundBody.md +27 -0
  61. data/docs/JudgeUnauthorized.md +17 -0
  62. data/docs/JudgeUnauthorizedBody.md +27 -0
  63. data/docs/ListRulesForbidden.md +17 -0
  64. data/docs/ListRulesForbiddenBody.md +27 -0
  65. data/docs/ListRulesInternalServerError.md +17 -0
  66. data/docs/ListRulesInternalServerErrorBody.md +27 -0
  67. data/docs/ListRulesOK.md +17 -0
  68. data/docs/ListRulesUnauthorized.md +17 -0
  69. data/docs/ListRulesUnauthorizedBody.md +27 -0
  70. data/docs/Rule.md +29 -0
  71. data/docs/RuleHandler.md +19 -0
  72. data/docs/RuleMatch.md +19 -0
  73. data/docs/SwaggerCreateRuleParameters.md +17 -0
  74. data/docs/SwaggerGetRuleParameters.md +17 -0
  75. data/docs/SwaggerHealthStatus.md +17 -0
  76. data/docs/SwaggerJSONWebKey.md +49 -0
  77. data/docs/SwaggerJSONWebKeySet.md +17 -0
  78. data/docs/SwaggerListRulesParameters.md +19 -0
  79. data/docs/SwaggerNotReadyStatus.md +17 -0
  80. data/docs/SwaggerRule.md +29 -0
  81. data/docs/SwaggerRuleHandler.md +19 -0
  82. data/docs/SwaggerRuleMatch.md +19 -0
  83. data/docs/SwaggerRuleResponse.md +17 -0
  84. data/docs/SwaggerRulesResponse.md +17 -0
  85. data/docs/SwaggerUpdateRuleParameters.md +19 -0
  86. data/docs/SwaggerVersion.md +17 -0
  87. data/docs/UpdateRuleForbidden.md +17 -0
  88. data/docs/UpdateRuleForbiddenBody.md +27 -0
  89. data/docs/UpdateRuleInternalServerError.md +17 -0
  90. data/docs/UpdateRuleInternalServerErrorBody.md +27 -0
  91. data/docs/UpdateRuleNotFound.md +17 -0
  92. data/docs/UpdateRuleNotFoundBody.md +27 -0
  93. data/docs/UpdateRuleOK.md +17 -0
  94. data/docs/UpdateRuleUnauthorized.md +17 -0
  95. data/docs/UpdateRuleUnauthorizedBody.md +27 -0
  96. data/docs/Upstream.md +21 -0
  97. data/docs/Version.md +17 -0
  98. data/docs/VersionApi.md +52 -0
  99. data/lib/ory-oathkeeper-client.rb +52 -0
  100. data/lib/ory-oathkeeper-client/api/api_api.rb +258 -0
  101. data/lib/ory-oathkeeper-client/api/health_api.rb +134 -0
  102. data/lib/ory-oathkeeper-client/api/version_api.rb +78 -0
  103. data/lib/ory-oathkeeper-client/api_client.rb +385 -0
  104. data/lib/ory-oathkeeper-client/api_error.rb +57 -0
  105. data/lib/ory-oathkeeper-client/configuration.rb +241 -0
  106. data/lib/ory-oathkeeper-client/models/create_rule_created.rb +207 -0
  107. data/lib/ory-oathkeeper-client/models/create_rule_forbidden.rb +207 -0
  108. data/lib/ory-oathkeeper-client/models/create_rule_forbidden_body.rb +260 -0
  109. data/lib/ory-oathkeeper-client/models/create_rule_internal_server_error.rb +207 -0
  110. data/lib/ory-oathkeeper-client/models/create_rule_internal_server_error_body.rb +260 -0
  111. data/lib/ory-oathkeeper-client/models/create_rule_unauthorized.rb +207 -0
  112. data/lib/ory-oathkeeper-client/models/create_rule_unauthorized_body.rb +260 -0
  113. data/lib/ory-oathkeeper-client/models/decisions_forbidden.rb +207 -0
  114. data/lib/ory-oathkeeper-client/models/decisions_forbidden_body.rb +260 -0
  115. data/lib/ory-oathkeeper-client/models/decisions_internal_server_error.rb +207 -0
  116. data/lib/ory-oathkeeper-client/models/decisions_internal_server_error_body.rb +260 -0
  117. data/lib/ory-oathkeeper-client/models/decisions_not_found.rb +207 -0
  118. data/lib/ory-oathkeeper-client/models/decisions_not_found_body.rb +260 -0
  119. data/lib/ory-oathkeeper-client/models/decisions_unauthorized.rb +207 -0
  120. data/lib/ory-oathkeeper-client/models/decisions_unauthorized_body.rb +260 -0
  121. data/lib/ory-oathkeeper-client/models/delete_rule_forbidden.rb +207 -0
  122. data/lib/ory-oathkeeper-client/models/delete_rule_forbidden_body.rb +260 -0
  123. data/lib/ory-oathkeeper-client/models/delete_rule_internal_server_error.rb +207 -0
  124. data/lib/ory-oathkeeper-client/models/delete_rule_internal_server_error_body.rb +260 -0
  125. data/lib/ory-oathkeeper-client/models/delete_rule_not_found.rb +207 -0
  126. data/lib/ory-oathkeeper-client/models/delete_rule_not_found_body.rb +260 -0
  127. data/lib/ory-oathkeeper-client/models/delete_rule_unauthorized.rb +207 -0
  128. data/lib/ory-oathkeeper-client/models/delete_rule_unauthorized_body.rb +260 -0
  129. data/lib/ory-oathkeeper-client/models/get_rule_forbidden.rb +207 -0
  130. data/lib/ory-oathkeeper-client/models/get_rule_forbidden_body.rb +260 -0
  131. data/lib/ory-oathkeeper-client/models/get_rule_internal_server_error.rb +207 -0
  132. data/lib/ory-oathkeeper-client/models/get_rule_internal_server_error_body.rb +260 -0
  133. data/lib/ory-oathkeeper-client/models/get_rule_not_found.rb +207 -0
  134. data/lib/ory-oathkeeper-client/models/get_rule_not_found_body.rb +260 -0
  135. data/lib/ory-oathkeeper-client/models/get_rule_ok.rb +207 -0
  136. data/lib/ory-oathkeeper-client/models/get_rule_unauthorized.rb +207 -0
  137. data/lib/ory-oathkeeper-client/models/get_rule_unauthorized_body.rb +260 -0
  138. data/lib/ory-oathkeeper-client/models/get_well_known_forbidden.rb +207 -0
  139. data/lib/ory-oathkeeper-client/models/get_well_known_forbidden_body.rb +260 -0
  140. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_internal_server_error.rb +207 -0
  141. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_internal_server_error_body.rb +260 -0
  142. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_ok.rb +207 -0
  143. data/lib/ory-oathkeeper-client/models/get_well_known_ok.rb +207 -0
  144. data/lib/ory-oathkeeper-client/models/get_well_known_unauthorized.rb +207 -0
  145. data/lib/ory-oathkeeper-client/models/get_well_known_unauthorized_body.rb +260 -0
  146. data/lib/ory-oathkeeper-client/models/health_not_ready_status.rb +209 -0
  147. data/lib/ory-oathkeeper-client/models/health_status.rb +207 -0
  148. data/lib/ory-oathkeeper-client/models/inline_response500.rb +253 -0
  149. data/lib/ory-oathkeeper-client/models/is_instance_alive_internal_server_error.rb +207 -0
  150. data/lib/ory-oathkeeper-client/models/is_instance_alive_internal_server_error_body.rb +260 -0
  151. data/lib/ory-oathkeeper-client/models/is_instance_alive_ok.rb +207 -0
  152. data/lib/ory-oathkeeper-client/models/json_web_key.rb +357 -0
  153. data/lib/ory-oathkeeper-client/models/json_web_key_set.rb +209 -0
  154. data/lib/ory-oathkeeper-client/models/judge_forbidden.rb +207 -0
  155. data/lib/ory-oathkeeper-client/models/judge_forbidden_body.rb +260 -0
  156. data/lib/ory-oathkeeper-client/models/judge_internal_server_error.rb +207 -0
  157. data/lib/ory-oathkeeper-client/models/judge_internal_server_error_body.rb +260 -0
  158. data/lib/ory-oathkeeper-client/models/judge_not_found.rb +207 -0
  159. data/lib/ory-oathkeeper-client/models/judge_not_found_body.rb +260 -0
  160. data/lib/ory-oathkeeper-client/models/judge_unauthorized.rb +207 -0
  161. data/lib/ory-oathkeeper-client/models/judge_unauthorized_body.rb +260 -0
  162. data/lib/ory-oathkeeper-client/models/list_rules_forbidden.rb +207 -0
  163. data/lib/ory-oathkeeper-client/models/list_rules_forbidden_body.rb +260 -0
  164. data/lib/ory-oathkeeper-client/models/list_rules_internal_server_error.rb +207 -0
  165. data/lib/ory-oathkeeper-client/models/list_rules_internal_server_error_body.rb +260 -0
  166. data/lib/ory-oathkeeper-client/models/list_rules_ok.rb +210 -0
  167. data/lib/ory-oathkeeper-client/models/list_rules_unauthorized.rb +207 -0
  168. data/lib/ory-oathkeeper-client/models/list_rules_unauthorized_body.rb +260 -0
  169. data/lib/ory-oathkeeper-client/models/rule.rb +268 -0
  170. data/lib/ory-oathkeeper-client/models/rule_handler.rb +217 -0
  171. data/lib/ory-oathkeeper-client/models/rule_match.rb +219 -0
  172. data/lib/ory-oathkeeper-client/models/swagger_create_rule_parameters.rb +207 -0
  173. data/lib/ory-oathkeeper-client/models/swagger_get_rule_parameters.rb +213 -0
  174. data/lib/ory-oathkeeper-client/models/swagger_health_status.rb +208 -0
  175. data/lib/ory-oathkeeper-client/models/swagger_json_web_key.rb +370 -0
  176. data/lib/ory-oathkeeper-client/models/swagger_json_web_key_set.rb +210 -0
  177. data/lib/ory-oathkeeper-client/models/swagger_list_rules_parameters.rb +218 -0
  178. data/lib/ory-oathkeeper-client/models/swagger_not_ready_status.rb +210 -0
  179. data/lib/ory-oathkeeper-client/models/swagger_rule.rb +268 -0
  180. data/lib/ory-oathkeeper-client/models/swagger_rule_handler.rb +218 -0
  181. data/lib/ory-oathkeeper-client/models/swagger_rule_match.rb +220 -0
  182. data/lib/ory-oathkeeper-client/models/swagger_rule_response.rb +207 -0
  183. data/lib/ory-oathkeeper-client/models/swagger_rules_response.rb +210 -0
  184. data/lib/ory-oathkeeper-client/models/swagger_update_rule_parameters.rb +222 -0
  185. data/lib/ory-oathkeeper-client/models/swagger_version.rb +208 -0
  186. data/lib/ory-oathkeeper-client/models/update_rule_forbidden.rb +207 -0
  187. data/lib/ory-oathkeeper-client/models/update_rule_forbidden_body.rb +260 -0
  188. data/lib/ory-oathkeeper-client/models/update_rule_internal_server_error.rb +207 -0
  189. data/lib/ory-oathkeeper-client/models/update_rule_internal_server_error_body.rb +260 -0
  190. data/lib/ory-oathkeeper-client/models/update_rule_not_found.rb +207 -0
  191. data/lib/ory-oathkeeper-client/models/update_rule_not_found_body.rb +260 -0
  192. data/lib/ory-oathkeeper-client/models/update_rule_ok.rb +207 -0
  193. data/lib/ory-oathkeeper-client/models/update_rule_unauthorized.rb +207 -0
  194. data/lib/ory-oathkeeper-client/models/update_rule_unauthorized_body.rb +260 -0
  195. data/lib/ory-oathkeeper-client/models/upstream.rb +227 -0
  196. data/lib/ory-oathkeeper-client/models/version.rb +207 -0
  197. data/lib/ory-oathkeeper-client/version.rb +15 -0
  198. data/ory-oathkeeper-client.gemspec +39 -0
  199. data/spec/api/api_api_spec.rb +115 -0
  200. data/spec/api/health_api_spec.rb +57 -0
  201. data/spec/api/version_api_spec.rb +46 -0
  202. data/spec/api_client_spec.rb +226 -0
  203. data/spec/configuration_spec.rb +42 -0
  204. data/spec/models/create_rule_created_spec.rb +41 -0
  205. data/spec/models/create_rule_forbidden_body_spec.rb +71 -0
  206. data/spec/models/create_rule_forbidden_spec.rb +41 -0
  207. data/spec/models/create_rule_internal_server_error_body_spec.rb +71 -0
  208. data/spec/models/create_rule_internal_server_error_spec.rb +41 -0
  209. data/spec/models/create_rule_unauthorized_body_spec.rb +71 -0
  210. data/spec/models/create_rule_unauthorized_spec.rb +41 -0
  211. data/spec/models/decisions_forbidden_body_spec.rb +71 -0
  212. data/spec/models/decisions_forbidden_spec.rb +41 -0
  213. data/spec/models/decisions_internal_server_error_body_spec.rb +71 -0
  214. data/spec/models/decisions_internal_server_error_spec.rb +41 -0
  215. data/spec/models/decisions_not_found_body_spec.rb +71 -0
  216. data/spec/models/decisions_not_found_spec.rb +41 -0
  217. data/spec/models/decisions_unauthorized_body_spec.rb +71 -0
  218. data/spec/models/decisions_unauthorized_spec.rb +41 -0
  219. data/spec/models/delete_rule_forbidden_body_spec.rb +71 -0
  220. data/spec/models/delete_rule_forbidden_spec.rb +41 -0
  221. data/spec/models/delete_rule_internal_server_error_body_spec.rb +71 -0
  222. data/spec/models/delete_rule_internal_server_error_spec.rb +41 -0
  223. data/spec/models/delete_rule_not_found_body_spec.rb +71 -0
  224. data/spec/models/delete_rule_not_found_spec.rb +41 -0
  225. data/spec/models/delete_rule_unauthorized_body_spec.rb +71 -0
  226. data/spec/models/delete_rule_unauthorized_spec.rb +41 -0
  227. data/spec/models/get_rule_forbidden_body_spec.rb +71 -0
  228. data/spec/models/get_rule_forbidden_spec.rb +41 -0
  229. data/spec/models/get_rule_internal_server_error_body_spec.rb +71 -0
  230. data/spec/models/get_rule_internal_server_error_spec.rb +41 -0
  231. data/spec/models/get_rule_not_found_body_spec.rb +71 -0
  232. data/spec/models/get_rule_not_found_spec.rb +41 -0
  233. data/spec/models/get_rule_ok_spec.rb +41 -0
  234. data/spec/models/get_rule_unauthorized_body_spec.rb +71 -0
  235. data/spec/models/get_rule_unauthorized_spec.rb +41 -0
  236. data/spec/models/get_well_known_forbidden_body_spec.rb +71 -0
  237. data/spec/models/get_well_known_forbidden_spec.rb +41 -0
  238. data/spec/models/get_well_known_json_web_keys_internal_server_error_body_spec.rb +71 -0
  239. data/spec/models/get_well_known_json_web_keys_internal_server_error_spec.rb +41 -0
  240. data/spec/models/get_well_known_json_web_keys_ok_spec.rb +41 -0
  241. data/spec/models/get_well_known_ok_spec.rb +41 -0
  242. data/spec/models/get_well_known_unauthorized_body_spec.rb +71 -0
  243. data/spec/models/get_well_known_unauthorized_spec.rb +41 -0
  244. data/spec/models/health_not_ready_status_spec.rb +41 -0
  245. data/spec/models/health_status_spec.rb +41 -0
  246. data/spec/models/inline_response500_spec.rb +71 -0
  247. data/spec/models/is_instance_alive_internal_server_error_body_spec.rb +71 -0
  248. data/spec/models/is_instance_alive_internal_server_error_spec.rb +41 -0
  249. data/spec/models/is_instance_alive_ok_spec.rb +41 -0
  250. data/spec/models/json_web_key_set_spec.rb +41 -0
  251. data/spec/models/json_web_key_spec.rb +137 -0
  252. data/spec/models/judge_forbidden_body_spec.rb +71 -0
  253. data/spec/models/judge_forbidden_spec.rb +41 -0
  254. data/spec/models/judge_internal_server_error_body_spec.rb +71 -0
  255. data/spec/models/judge_internal_server_error_spec.rb +41 -0
  256. data/spec/models/judge_not_found_body_spec.rb +71 -0
  257. data/spec/models/judge_not_found_spec.rb +41 -0
  258. data/spec/models/judge_unauthorized_body_spec.rb +71 -0
  259. data/spec/models/judge_unauthorized_spec.rb +41 -0
  260. data/spec/models/list_rules_forbidden_body_spec.rb +71 -0
  261. data/spec/models/list_rules_forbidden_spec.rb +41 -0
  262. data/spec/models/list_rules_internal_server_error_body_spec.rb +71 -0
  263. data/spec/models/list_rules_internal_server_error_spec.rb +41 -0
  264. data/spec/models/list_rules_ok_spec.rb +41 -0
  265. data/spec/models/list_rules_unauthorized_body_spec.rb +71 -0
  266. data/spec/models/list_rules_unauthorized_spec.rb +41 -0
  267. data/spec/models/rule_handler_spec.rb +47 -0
  268. data/spec/models/rule_match_spec.rb +47 -0
  269. data/spec/models/rule_spec.rb +77 -0
  270. data/spec/models/swagger_create_rule_parameters_spec.rb +41 -0
  271. data/spec/models/swagger_get_rule_parameters_spec.rb +41 -0
  272. data/spec/models/swagger_health_status_spec.rb +41 -0
  273. data/spec/models/swagger_json_web_key_set_spec.rb +41 -0
  274. data/spec/models/swagger_json_web_key_spec.rb +137 -0
  275. data/spec/models/swagger_list_rules_parameters_spec.rb +47 -0
  276. data/spec/models/swagger_not_ready_status_spec.rb +41 -0
  277. data/spec/models/swagger_rule_handler_spec.rb +47 -0
  278. data/spec/models/swagger_rule_match_spec.rb +47 -0
  279. data/spec/models/swagger_rule_response_spec.rb +41 -0
  280. data/spec/models/swagger_rule_spec.rb +77 -0
  281. data/spec/models/swagger_rules_response_spec.rb +41 -0
  282. data/spec/models/swagger_update_rule_parameters_spec.rb +47 -0
  283. data/spec/models/swagger_version_spec.rb +41 -0
  284. data/spec/models/update_rule_forbidden_body_spec.rb +71 -0
  285. data/spec/models/update_rule_forbidden_spec.rb +41 -0
  286. data/spec/models/update_rule_internal_server_error_body_spec.rb +71 -0
  287. data/spec/models/update_rule_internal_server_error_spec.rb +41 -0
  288. data/spec/models/update_rule_not_found_body_spec.rb +71 -0
  289. data/spec/models/update_rule_not_found_spec.rb +41 -0
  290. data/spec/models/update_rule_ok_spec.rb +41 -0
  291. data/spec/models/update_rule_unauthorized_body_spec.rb +71 -0
  292. data/spec/models/update_rule_unauthorized_spec.rb +41 -0
  293. data/spec/models/upstream_spec.rb +53 -0
  294. data/spec/models/version_spec.rb +41 -0
  295. data/spec/spec_helper.rb +111 -0
  296. metadata +497 -0
@@ -0,0 +1,219 @@
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 RuleMatch
17
+ # An array of HTTP methods (e.g. GET, POST, PUT, DELETE, ...). When ORY Oathkeeper searches for rules to decide what to do with an incoming request to the proxy server, it compares the HTTP method of the incoming request with the HTTP methods of each rules. If a match is found, the rule is considered a partial match. If the matchesUrl field is satisfied as well, the rule is considered a full match.
18
+ attr_accessor :methods
19
+
20
+ # This field represents the URL pattern this rule matches. When ORY Oathkeeper searches for rules to decide what to do with an incoming request to the proxy server, it compares the full request URL (e.g. https://mydomain.com/api/resource) without query parameters of the incoming request with this field. If a match is found, the rule is considered a partial match. If the matchesMethods field is satisfied as well, the rule is considered a full match. You can use regular expressions in this field to match more than one url. Regular expressions are encapsulated in brackets < and >. The following example matches all paths of the domain `mydomain.com`: `https://mydomain.com/<.*>`.
21
+ attr_accessor :url
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'methods' => :'methods',
27
+ :'url' => :'url'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'methods' => :'Array<String>',
35
+ :'url' => :'String'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::RuleMatch` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::RuleMatch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'methods')
61
+ if (value = attributes[:'methods']).is_a?(Array)
62
+ self.methods = value
63
+ end
64
+ end
65
+
66
+ if attributes.key?(:'url')
67
+ self.url = attributes[:'url']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ invalid_properties = Array.new
75
+ invalid_properties
76
+ end
77
+
78
+ # Check to see if the all the properties in the model are valid
79
+ # @return true if the model is valid
80
+ def valid?
81
+ true
82
+ end
83
+
84
+ # Checks equality by comparing each attribute.
85
+ # @param [Object] Object to be compared
86
+ def ==(o)
87
+ return true if self.equal?(o)
88
+ self.class == o.class &&
89
+ methods == o.methods &&
90
+ url == o.url
91
+ end
92
+
93
+ # @see the `==` method
94
+ # @param [Object] Object to be compared
95
+ def eql?(o)
96
+ self == o
97
+ end
98
+
99
+ # Calculates hash code according to all attributes.
100
+ # @return [Integer] Hash code
101
+ def hash
102
+ [methods, url].hash
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def self.build_from_hash(attributes)
109
+ new.build_from_hash(attributes)
110
+ end
111
+
112
+ # Builds the object from hash
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ # @return [Object] Returns the model itself
115
+ def build_from_hash(attributes)
116
+ return nil unless attributes.is_a?(Hash)
117
+ self.class.openapi_types.each_pair do |key, type|
118
+ if type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
122
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
123
+ end
124
+ elsif !attributes[self.class.attribute_map[key]].nil?
125
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
126
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
127
+ end
128
+
129
+ self
130
+ end
131
+
132
+ # Deserializes the data based on type
133
+ # @param string type Data type
134
+ # @param string value Value to be deserialized
135
+ # @return [Object] Deserialized data
136
+ def _deserialize(type, value)
137
+ case type.to_sym
138
+ when :DateTime
139
+ DateTime.parse(value)
140
+ when :Date
141
+ Date.parse(value)
142
+ when :String
143
+ value.to_s
144
+ when :Integer
145
+ value.to_i
146
+ when :Float
147
+ value.to_f
148
+ when :Boolean
149
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
150
+ true
151
+ else
152
+ false
153
+ end
154
+ when :Object
155
+ # generic object (usually a Hash), return directly
156
+ value
157
+ when /\AArray<(?<inner_type>.+)>\z/
158
+ inner_type = Regexp.last_match[:inner_type]
159
+ value.map { |v| _deserialize(inner_type, v) }
160
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
161
+ k_type = Regexp.last_match[:k_type]
162
+ v_type = Regexp.last_match[:v_type]
163
+ {}.tap do |hash|
164
+ value.each do |k, v|
165
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
166
+ end
167
+ end
168
+ else # model
169
+ OryHydraClient.const_get(type).build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+ end
219
+ end
@@ -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
+ # SwaggerCreateRuleParameters SwaggerCreateRuleParameters SwaggerCreateRuleParameters SwaggerCreateRuleParameters SwaggerCreateRuleParameters swagger create rule parameters
17
+ class SwaggerCreateRuleParameters
18
+ attr_accessor :body
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'body' => :'Body'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.openapi_types
29
+ {
30
+ :'body' => :'SwaggerRule'
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::SwaggerCreateRuleParameters` 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::SwaggerCreateRuleParameters`. 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?(:'body')
56
+ self.body = attributes[:'body']
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
+ body == o.body
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
+ [body].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,213 @@
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
+ # SwaggerGetRuleParameters swagger get rule parameters
17
+ class SwaggerGetRuleParameters
18
+ # in: path
19
+ attr_accessor :id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'id' => :'id'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.openapi_types
30
+ {
31
+ :'id' => :'String'
32
+ }
33
+ end
34
+
35
+ # List of attributes with nullable: true
36
+ def self.openapi_nullable
37
+ Set.new([
38
+ ])
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ if (!attributes.is_a?(Hash))
45
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::SwaggerGetRuleParameters` initialize method"
46
+ end
47
+
48
+ # check to see if the attribute exists and convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h|
50
+ if (!self.class.attribute_map.key?(k.to_sym))
51
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::SwaggerGetRuleParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
52
+ end
53
+ h[k.to_sym] = v
54
+ }
55
+
56
+ if attributes.key?(:'id')
57
+ self.id = attributes[:'id']
58
+ end
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properties with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ if @id.nil?
66
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
67
+ end
68
+
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ return false if @id.nil?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ id == o.id
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [id].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :DateTime
133
+ DateTime.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :Boolean
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ OryHydraClient.const_get(type).build_from_hash(value)
164
+ end
165
+ end
166
+
167
+ # Returns the string representation of the object
168
+ # @return [String] String presentation of the object
169
+ def to_s
170
+ to_hash.to_s
171
+ end
172
+
173
+ # to_body is an alias to to_hash (backward compatibility)
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_body
176
+ to_hash
177
+ end
178
+
179
+ # Returns the object in the form of hash
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_hash
182
+ hash = {}
183
+ self.class.attribute_map.each_pair do |attr, param|
184
+ value = self.send(attr)
185
+ if value.nil?
186
+ is_nullable = self.class.openapi_nullable.include?(attr)
187
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
+ end
189
+
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+ end
213
+ end