Skip to content

Commit

Permalink
flip auth method order to return underlying result
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgrunewald committed Aug 15, 2023
1 parent 767065d commit 1f4656a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions iot_config/src/route_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,13 @@ impl RouteService {
where
R: MsgVerify,
{
if let Ok(()) = self.verify_request_signature(signer, request, id).await {
if self
.verify_stream_request_signature(signer, request)
.is_ok()
{
return Ok(());
}
self.verify_stream_request_signature(signer, request)
self.verify_request_signature(signer, request, id).await
}

fn sign_response(&self, response: &[u8]) -> Result<Vec<u8>, Status> {
Expand Down

0 comments on commit 1f4656a

Please sign in to comment.