pub enum SecretOutcome {
NotConfigured,
Accepted(HasuraIdentity),
Absent,
Rejected,
}Expand description
What the admin secret alone can settle about a request.
Three of the four outcomes are not answers. A secret that is configured and not offered does not refuse the request, because a token or a webhook may still authenticate it; only a secret that is offered and wrong is a refusal, since a caller that tried to be an administrator and failed is not then asked for a token.
Variants§
NotConfigured
No secret is configured. This server does not gate on one, and no header is trusted.
Accepted(HasuraIdentity)
The caller holds the secret.
Absent
A secret is configured and none was offered. Something else may authenticate the request.
Rejected
A secret is configured and the caller offered the wrong one.
Trait Implementations§
Source§impl Clone for SecretOutcome
impl Clone for SecretOutcome
Auto Trait Implementations§
impl Freeze for SecretOutcome
impl RefUnwindSafe for SecretOutcome
impl Send for SecretOutcome
impl Sync for SecretOutcome
impl Unpin for SecretOutcome
impl UnsafeUnpin for SecretOutcome
impl UnwindSafe for SecretOutcome
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