pub struct Principal {
pub subject: String,
pub issuer: String,
pub audience: Vec<String>,
pub scopes: Vec<String>,
pub roles: Vec<String>,
pub claims: Value,
}Expand description
Represents an authenticated principal extracted from token claims.
Provider-neutral: the ClaimsMapper trait in camel-auth is responsible
for mapping provider-specific claim shapes into this structure.
Fields§
§subject: String§issuer: String§audience: Vec<String>§scopes: Vec<String>§roles: Vec<String>§claims: ValueImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Principal
impl<'de> Deserialize<'de> for Principal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Principal
Auto Trait Implementations§
impl Freeze for Principal
impl RefUnwindSafe for Principal
impl Send for Principal
impl Sync for Principal
impl Unpin for Principal
impl UnsafeUnpin for Principal
impl UnwindSafe for Principal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more