Struct libjwt::Payload
[−]
[src]
pub struct Payload<'p>(_);
Jwt's payload
Methods
impl<'p> Payload<'p>
[src]
pub fn new<S>(raw: S) -> Self where
S: Into<Cow<'p, str>>,
[src]
S: Into<Cow<'p, str>>,
Create a Jwt's payload from any type who can be turned into a Cow<'p, str>
pub fn convert<T>(base: T) -> Result<Self> where
T: AsBase64,
[src]
T: AsBase64,
Convert a base64 transformable into a payload.
pub fn apply(self, claims: Vec<RegisteredClaims>) -> Result<Payload<'p>>
[src]
Apply claims on payload
pub fn verify(&self, verification: Vec<Verifications>) -> Result<()>
[src]
Verify if a payload is valid
Trait Implementations
impl<'p> Debug for Payload<'p>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'p> Clone for Payload<'p>
[src]
fn clone(&self) -> Payload<'p>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'p> FromBase64 for Payload<'p>
[src]
fn from_base64(&self) -> Result<Vec<u8>>
[src]
Convert it!