[][src]Trait rocket_simple_authorization::SimpleAuthorization

pub trait SimpleAuthorization<E> {
    fn has_authority<S: AsRef<str>>(key: Option<S>) -> Option<Option<E>>;
fn create_auth(key: Option<E>) -> Self; }

The trait for an authorizer.

Required methods

fn has_authority<S: AsRef<str>>(key: Option<S>) -> Option<Option<E>>

Check whether the key is valid or not. And a generic type can also be returned to help create an auth instance.

fn create_auth(key: Option<E>) -> Self

Create an auth instance.

Loading content...

Implementors

Loading content...