Enum oxide_auth::code_grant::accesstoken::Output[][src]

pub enum Output<'machine> {
    Authenticate {
        client: &'machine str,
        passdata: Option<&'machine [u8]>,
    },
    Recover {
        code: &'machine str,
    },
    Extend {
        extensions: &'machine mut Extensions,
    },
    Issue {
        grant: &'machine Grant,
    },
    Ok(BearerToken),
    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 of Authenticate

client: &'machine str

The to-be-authenticated client.

passdata: Option<&'machine [u8]>

The supplied passdata/password.

Recover

The issuer should try to recover the grant for this code

Fulfilled by Input::Recovered.

Fields of Recover

code: &'machine str

The code from current request

Extend

The extension (if any) should provide the extensions

Fullfilled by Input::Extended

Fields of Extend

extensions: &'machine mut Extensions

The grant extensions if any

Issue

The issue should issue a new access token

Fullfilled by Input::Issued

Fields of Issue

grant: &'machine Grant

The grant to be used in the token generation

The state machine finished and a new bearer token was generated

This output can not be requested repeatedly, any future Input will yield a primitive error instead.

Tuple Fields of Ok

0: BearerToken
Err(Box<Error>)

The state machine finished in an error.

The error will be repeated on any following input.

Tuple Fields of Err

0: Box<Error>

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.