Enum Output

Source
pub enum Output<'machine> {
    Authenticate {
        client: &'machine str,
        passdata: &'machine [u8],
    },
    Binding {
        client_id: &'machine str,
    },
    Extend,
    Negotiate {
        bound_client: &'machine BoundClient<'static>,
        scope: Option<Scope>,
    },
    Ok {
        pre_grant: &'machine PreGrant,
        extensions: &'machine Extensions,
    },
    Err(Box<Error>),
}
Expand description

A request by the statemachine to the executor.

Each variant is fulfilled by certain variants of the next inputs as an argument to AccessToken::advance. The output of most states is simply repeated if Input::None is provided instead but note that the successful bearer token response is not repeated.

Variants§

§

Authenticate

The registrar should authenticate a client.

Fulfilled by Input::Authenticated. In an unsuccessful case, the executor should not continue and discard the flow.

Fields

§client: &'machine str

The to-be-authenticated client.

§passdata: &'machine [u8]

The supplied passdata/password.

§

Binding

Ask registrar to bind the client. There is no redirect URI provided from the request, so the registrar will have to pick one arbitrarily (or return an invalid one). Ths redirect URL will not be followed.

Fulfilled by Input::Bound

Fields

§client_id: &'machine str

The client to bind

§

Extend

The extension (if any) should provide the extensions

Fullfilled by Input::Extended

§

Negotiate

Ask registrar to negotiate.

Fulfilled by Input::Negotiated

Fields

§bound_client: &'machine BoundClient<'static>

The current bound client

§scope: Option<Scope>

The scope, if any

§

Ok

The state machine finished and the frontend should assign an owner ID and then issue the token.

Fullfilled by Input::Issued

Fields

§pre_grant: &'machine PreGrant

The grant to be used in the token generation

§extensions: &'machine Extensions

The extensions to include

§

Err(Box<Error>)

The state machine finished in an error.

The error will be repeated on any following input.

Auto Trait Implementations§

§

impl<'machine> Freeze for Output<'machine>

§

impl<'machine> RefUnwindSafe for Output<'machine>

§

impl<'machine> Send for Output<'machine>

§

impl<'machine> Sync for Output<'machine>

§

impl<'machine> Unpin for Output<'machine>

§

impl<'machine> UnwindSafe for Output<'machine>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,