summaryrefslogtreecommitdiff
path: root/src/authorization/check_service.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/authorization/check_service.rs')
-rw-r--r--src/authorization/check_service.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/authorization/check_service.rs b/src/authorization/check_service.rs
index 83e6705a..0f29f0b9 100644
--- a/src/authorization/check_service.rs
+++ b/src/authorization/check_service.rs
@@ -1,4 +1,4 @@
-use crate::rpc::envoy::service::auth::v3::{CheckRequest, CheckResponse};
+use envoy_types::pb::envoy::service::auth::v3::{CheckRequest, CheckResponse};
use std::sync::Arc;
use tonic::{Request, Response, Status};
@@ -16,28 +16,30 @@ impl CheckService {
}
#[tonic::async_trait]
-impl crate::rpc::envoy::service::auth::v3::authorization_server::Authorization for CheckService {
+impl envoy_types::pb::envoy::service::auth::v3::authorization_server::Authorization for CheckService {
async fn check(
&self,
request: Request<CheckRequest>,
) -> Result<Response<CheckResponse>, Status> {
if self.authorizer.authorize(request.into_inner()) {
Ok(Response::new(CheckResponse {
- status: Some(crate::rpc::google::rpc::Status {
+ status: Some(envoy_types::pb::google::rpc::Status {
code: 0,
message: "OK".to_string(),
details: vec![],
}),
dynamic_metadata: None,
+ http_response: None,
}))
} else {
Ok(Response::new(CheckResponse {
- status: Some(crate::rpc::google::rpc::Status {
+ status: Some(envoy_types::pb::google::rpc::Status {
code: 7,
message: "Unauthorized".to_string(),
details: vec![],
}),
dynamic_metadata: None,
+ http_response: None,
}))
}
}