-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: include
claims
as capability handler parameter
Signed-off-by: Roman Volosatovs <[email protected]>
- Loading branch information
1 parent
909e04f
commit 3d19c94
Showing
9 changed files
with
105 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
use core::convert::Infallible; | ||
|
||
use wascap::jwt; | ||
|
||
/// A logging capability, which discards all logging statements | ||
pub struct Logging; | ||
|
||
impl super::Logging for Logging { | ||
type Error = Infallible; | ||
|
||
fn debug(&self, _: String) -> Result<(), Self::Error> { | ||
fn debug(&self, _: &jwt::Claims<jwt::Actor>, _: String) -> Result<(), Self::Error> { | ||
Ok(()) | ||
} | ||
|
||
fn info(&self, _: String) -> Result<(), Self::Error> { | ||
fn info(&self, _: &jwt::Claims<jwt::Actor>, _: String) -> Result<(), Self::Error> { | ||
Ok(()) | ||
} | ||
|
||
fn warn(&self, _: String) -> Result<(), Self::Error> { | ||
fn warn(&self, _: &jwt::Claims<jwt::Actor>, _: String) -> Result<(), Self::Error> { | ||
Ok(()) | ||
} | ||
|
||
fn error(&self, _: String) -> Result<(), Self::Error> { | ||
fn error(&self, _: &jwt::Claims<jwt::Actor>, _: String) -> Result<(), Self::Error> { | ||
Ok(()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.