mirror of https://github.com/fafhrd91/actix-web
make get_identity(extensions: &Extensions) public for use in guards
This commit is contained in:
parent
6db909a3e7
commit
4c9fe4d080
|
@ -116,7 +116,7 @@ impl Identity {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_identity(extensions: &Extensions) -> Option<String> {
|
||||
pub fn get_identity(extensions: &Extensions) -> Option<String> {
|
||||
if let Some(id) = extensions.get::<IdentityItem>() {
|
||||
id.id.clone()
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue