[][src]Trait rocket_simple_authorization::SimpleAuthorization

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

The trait for an authorizer.

Required methods

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

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

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

Create an auth instance.

Loading content...

Implementors

Loading content...