Enum diana::AuthBlockLevel [−][src]
pub enum AuthBlockLevel { AllowAll, BlockUnauthenticated, AllowMissing, }
Expand description
An enum for the level of blocking imposed on a particular endpoint. Your choice on this should be carefully evaluated based on your threat model. Please choose wisely!
Variants
Allows anything through.
- Valid token -> allow
- Invalid token -> allow
- Missing token -> allow
Blocks eveything except requests with valid tokens.
Note that, with this setting, introspection will be impossible in the GraphiQL playground. You may want to use AllowMissing
in development
and then this in production (see the book).
- Valid token -> allow
- Invalid token -> block
- Missing token -> block
Allows requests with valid tokens or no token at all. Only blocks requests that specify an invalid token. This is mostly useful for development to enable introspection in the GraphiQL playground (see the book).
- Valid token -> allow
- Invalid token -> block
- Missing token -> allow
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AuthBlockLevel
impl Send for AuthBlockLevel
impl Sync for AuthBlockLevel
impl Unpin for AuthBlockLevel
impl UnwindSafe for AuthBlockLevel
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more