diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-31 18:43:22 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-31 18:43:22 -0800 |
commit | 7b7e271decb2fbd5858aaae03616aa0da57a9429 (patch) | |
tree | b47a171d696eace8c0eca5215733c2514dadc93c /rust | |
parent | 42ffee8c583729287aed7eaa6df4b7b121c1f7f6 (diff) | |
download | fatcat-7b7e271decb2fbd5858aaae03616aa0da57a9429.tar.gz fatcat-7b7e271decb2fbd5858aaae03616aa0da57a9429.zip |
add missing security/auth declarations
Diffstat (limited to 'rust')
-rw-r--r-- | rust/fatcat-api-spec/README.md | 2 | ||||
-rw-r--r-- | rust/fatcat-api-spec/api.yaml | 50 | ||||
-rw-r--r-- | rust/fatcat-api-spec/api/swagger.yaml | 50 | ||||
-rw-r--r-- | rust/fatcat-api-spec/src/server.rs | 50 |
4 files changed, 151 insertions, 1 deletions
diff --git a/rust/fatcat-api-spec/README.md b/rust/fatcat-api-spec/README.md index 7e946b16..4f7f811f 100644 --- a/rust/fatcat-api-spec/README.md +++ b/rust/fatcat-api-spec/README.md @@ -13,7 +13,7 @@ To see how to make this your own, look here: [README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md) - API version: 0.1.0 -- Build date: 2019-01-01T01:45:02.795Z +- Build date: 2019-01-01T02:26:01.855Z This autogenerated project defines an API crate `fatcat` which contains: * An `Api` trait defining the API in Rust. diff --git a/rust/fatcat-api-spec/api.yaml b/rust/fatcat-api-spec/api.yaml index 80db5074..b7f7fbb3 100644 --- a/rust/fatcat-api-spec/api.yaml +++ b/rust/fatcat-api-spec/api.yaml @@ -823,6 +823,8 @@ paths: in: path required: true <<: *FATCATUUID + security: + - Bearer: [] responses: 200: description: Deleted Edit @@ -1102,6 +1104,8 @@ paths: in: path required: true <<: *FATCATUUID + security: + - Bearer: [] responses: 200: description: Deleted Edit @@ -1363,6 +1367,8 @@ paths: in: path required: true <<: *FATCATUUID + security: + - Bearer: [] responses: 200: description: Deleted Edit @@ -1385,6 +1391,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 201: description: Created Entity @@ -1415,6 +1423,8 @@ paths: type: array items: $ref: "#/definitions/fileset_entity" + security: + - Bearer: [] responses: 201: description: Created Entities @@ -1465,6 +1475,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 200: description: Updated Entity @@ -1481,6 +1493,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 200: description: Deleted Entity @@ -1582,6 +1596,8 @@ paths: in: path required: true <<: *FATCATUUID + security: + - Bearer: [] responses: 200: description: Deleted Edit @@ -1604,6 +1620,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 201: description: Created Entity @@ -1634,6 +1652,8 @@ paths: type: array items: $ref: "#/definitions/webcapture_entity" + security: + - Bearer: [] responses: 201: description: Created Entities @@ -1684,6 +1704,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 200: description: Updated Entity @@ -1700,6 +1722,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 200: description: Deleted Entity @@ -1801,6 +1825,8 @@ paths: in: path required: true <<: *FATCATUUID + security: + - Bearer: [] responses: 200: description: Deleted Edit @@ -1823,6 +1849,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 201: description: Created Entity @@ -1853,6 +1881,8 @@ paths: type: array items: $ref: "#/definitions/release_entity" + security: + - Bearer: [] responses: 201: description: Created Entities @@ -1903,6 +1933,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 200: description: Updated Entity @@ -1919,6 +1951,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 200: description: Deleted Entity @@ -2135,6 +2169,8 @@ paths: in: path required: true <<: *FATCATUUID + security: + - Bearer: [] responses: 200: description: Deleted Edit @@ -2157,6 +2193,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 201: description: Created Entity @@ -2187,6 +2225,8 @@ paths: type: array items: $ref: "#/definitions/work_entity" + security: + - Bearer: [] responses: 201: description: Created Entities @@ -2237,6 +2277,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 200: description: Updated Entity @@ -2253,6 +2295,8 @@ paths: in: query required: false type: string + security: + - Bearer: [] responses: 200: description: Deleted Entity @@ -2377,6 +2421,8 @@ paths: in: path required: true <<: *FATCATUUID + security: + - Bearer: [] responses: 200: description: Deleted Edit @@ -2447,6 +2493,8 @@ paths: required: true schema: $ref: "#/definitions/editgroup" + security: + - Bearer: [] responses: 201: description: Successfully Created @@ -2498,6 +2546,8 @@ paths: operationId: "accept_editgroup" tags: # TAGLINE - edit-lifecycle # TAGLINE + security: + - Bearer: [] responses: 200: description: Merged Successfully diff --git a/rust/fatcat-api-spec/api/swagger.yaml b/rust/fatcat-api-spec/api/swagger.yaml index 12bfe192..89017877 100644 --- a/rust/fatcat-api-spec/api/swagger.yaml +++ b/rust/fatcat-api-spec/api/swagger.yaml @@ -860,6 +860,8 @@ paths: uppercase_operation_id: "DELETE_CONTAINER_EDIT" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_container_edit" uppercase_operation_id: "DELETE_CONTAINER_EDIT" path: "/container/edit/:edit_id" @@ -1768,6 +1770,8 @@ paths: uppercase_operation_id: "DELETE_CREATOR_EDIT" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_creator_edit" uppercase_operation_id: "DELETE_CREATOR_EDIT" path: "/creator/edit/:edit_id" @@ -2625,6 +2629,8 @@ paths: uppercase_operation_id: "DELETE_FILE_EDIT" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_file_edit" uppercase_operation_id: "DELETE_FILE_EDIT" path: "/file/edit/:edit_id" @@ -2712,6 +2718,8 @@ paths: uppercase_operation_id: "CREATE_FILESET" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "create_fileset" uppercase_operation_id: "CREATE_FILESET" path: "/fileset" @@ -2812,6 +2820,8 @@ paths: uppercase_operation_id: "CREATE_FILESET_BATCH" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "create_fileset_batch" uppercase_operation_id: "CREATE_FILESET_BATCH" path: "/fileset/batch" @@ -2974,6 +2984,8 @@ paths: uppercase_operation_id: "UPDATE_FILESET" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "update_fileset" uppercase_operation_id: "UPDATE_FILESET" path: "/fileset/:ident" @@ -3055,6 +3067,8 @@ paths: uppercase_operation_id: "DELETE_FILESET" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_fileset" uppercase_operation_id: "DELETE_FILESET" path: "/fileset/:ident" @@ -3384,6 +3398,8 @@ paths: uppercase_operation_id: "DELETE_FILESET_EDIT" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_fileset_edit" uppercase_operation_id: "DELETE_FILESET_EDIT" path: "/fileset/edit/:edit_id" @@ -3471,6 +3487,8 @@ paths: uppercase_operation_id: "CREATE_WEBCAPTURE" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "create_webcapture" uppercase_operation_id: "CREATE_WEBCAPTURE" path: "/webcapture" @@ -3571,6 +3589,8 @@ paths: uppercase_operation_id: "CREATE_WEBCAPTURE_BATCH" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "create_webcapture_batch" uppercase_operation_id: "CREATE_WEBCAPTURE_BATCH" path: "/webcapture/batch" @@ -3733,6 +3753,8 @@ paths: uppercase_operation_id: "UPDATE_WEBCAPTURE" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "update_webcapture" uppercase_operation_id: "UPDATE_WEBCAPTURE" path: "/webcapture/:ident" @@ -3814,6 +3836,8 @@ paths: uppercase_operation_id: "DELETE_WEBCAPTURE" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_webcapture" uppercase_operation_id: "DELETE_WEBCAPTURE" path: "/webcapture/:ident" @@ -4143,6 +4167,8 @@ paths: uppercase_operation_id: "DELETE_WEBCAPTURE_EDIT" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_webcapture_edit" uppercase_operation_id: "DELETE_WEBCAPTURE_EDIT" path: "/webcapture/edit/:edit_id" @@ -4230,6 +4256,8 @@ paths: uppercase_operation_id: "CREATE_RELEASE" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "create_release" uppercase_operation_id: "CREATE_RELEASE" path: "/release" @@ -4330,6 +4358,8 @@ paths: uppercase_operation_id: "CREATE_RELEASE_BATCH" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "create_release_batch" uppercase_operation_id: "CREATE_RELEASE_BATCH" path: "/release/batch" @@ -4492,6 +4522,8 @@ paths: uppercase_operation_id: "UPDATE_RELEASE" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "update_release" uppercase_operation_id: "UPDATE_RELEASE" path: "/release/:ident" @@ -4573,6 +4605,8 @@ paths: uppercase_operation_id: "DELETE_RELEASE" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_release" uppercase_operation_id: "DELETE_RELEASE" path: "/release/:ident" @@ -5193,6 +5227,8 @@ paths: uppercase_operation_id: "DELETE_RELEASE_EDIT" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_release_edit" uppercase_operation_id: "DELETE_RELEASE_EDIT" path: "/release/edit/:edit_id" @@ -5280,6 +5316,8 @@ paths: uppercase_operation_id: "CREATE_WORK" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "create_work" uppercase_operation_id: "CREATE_WORK" path: "/work" @@ -5380,6 +5418,8 @@ paths: uppercase_operation_id: "CREATE_WORK_BATCH" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "create_work_batch" uppercase_operation_id: "CREATE_WORK_BATCH" path: "/work/batch" @@ -5542,6 +5582,8 @@ paths: uppercase_operation_id: "UPDATE_WORK" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "update_work" uppercase_operation_id: "UPDATE_WORK" path: "/work/:ident" @@ -5623,6 +5665,8 @@ paths: uppercase_operation_id: "DELETE_WORK" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_work" uppercase_operation_id: "DELETE_WORK" path: "/work/:ident" @@ -6016,6 +6060,8 @@ paths: uppercase_operation_id: "DELETE_WORK_EDIT" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "delete_work_edit" uppercase_operation_id: "DELETE_WORK_EDIT" path: "/work/edit/:edit_id" @@ -6194,6 +6240,8 @@ paths: uppercase_operation_id: "CREATE_EDITGROUP" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "create_editgroup" uppercase_operation_id: "CREATE_EDITGROUP" path: "/editgroup" @@ -6341,6 +6389,8 @@ paths: uppercase_operation_id: "ACCEPT_EDITGROUP" uppercase_data_type: "ERRORRESPONSE" producesJson: true + security: + - Bearer: [] operation_id: "accept_editgroup" uppercase_operation_id: "ACCEPT_EDITGROUP" path: "/editgroup/:editgroup_id/accept" diff --git a/rust/fatcat-api-spec/src/server.rs b/rust/fatcat-api-spec/src/server.rs index 268d194c..19e33194 100644 --- a/rust/fatcat-api-spec/src/server.rs +++ b/rust/fatcat-api-spec/src/server.rs @@ -510,6 +510,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_edit_id = { let param = req @@ -1716,6 +1718,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_edit_id = { let param = req @@ -2794,6 +2798,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_editgroup_id = { let param = req @@ -2916,6 +2922,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for // any unused fields. @@ -3663,6 +3671,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_edit_id = { let param = req @@ -4471,6 +4481,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default(); let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok()); @@ -4609,6 +4621,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default(); let param_autoaccept = query_params.get("autoaccept").and_then(|list| list.first()).and_then(|x| x.parse::<bool>().ok()); @@ -4748,6 +4762,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_ident = { let param = req @@ -4864,6 +4880,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_edit_id = { let param = req @@ -5435,6 +5453,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_ident = { let param = req @@ -5588,6 +5608,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default(); let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok()); @@ -5726,6 +5748,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default(); let param_autoaccept = query_params.get("autoaccept").and_then(|list| list.first()).and_then(|x| x.parse::<bool>().ok()); @@ -5865,6 +5889,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default(); let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok()); @@ -6003,6 +6029,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_ident = { let param = req @@ -6119,6 +6147,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_edit_id = { let param = req @@ -7057,6 +7087,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_ident = { let param = req @@ -7210,6 +7242,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default(); let param_editgroup_id = query_params.get("editgroup_id").and_then(|list| list.first()).and_then(|x| x.parse::<String>().ok()); @@ -7348,6 +7382,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default(); let param_autoaccept = query_params.get("autoaccept").and_then(|list| list.first()).and_then(|x| x.parse::<bool>().ok()); @@ -7487,6 +7523,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_ident = { let param = req @@ -7603,6 +7641,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_edit_id = { let param = req @@ -8174,6 +8214,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_ident = { let param = req @@ -8327,6 +8369,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default(); let param_autoaccept = query_params.get("autoaccept").and_then(|list| list.first()).and_then(|x| x.parse::<bool>().ok()); @@ -8466,6 +8510,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_ident = { let param = req @@ -8582,6 +8628,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_edit_id = { let param = req @@ -9246,6 +9294,8 @@ where context.auth_data = req.extensions.remove::<AuthData>(); context.authorization = req.extensions.remove::<Authorization>(); + let authorization = context.authorization.as_ref().ok_or_else(|| Response::with((status::Forbidden, "Unauthenticated".to_string())))?; + // Path parameters let param_ident = { let param = req |