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

pub enum Output<'machine> {
    GetRequest,
    Recover {
        token: &'machine str,
    },
    DetermineScopes,
    Ok(Box<Grant>),
    Err(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 Refresh::next. 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.

This borrows data from the underlying state machine, so you need to drop it before advancing it with newly provided input.

Variants

GetRequest

The state requires some information from the request to advance.

Recover

The issuer should try to recover the grant of a bearer token.

Fulfilled by Input::Recovered.

Fields of Recover

token: &'machine str

The token supplied by the client.

DetermineScopes

The executor must determine the scopes applying to the resource.

Fulfilled by Input::Scopes.

Ok(Box<Grant>)

The state machine finished and access was allowed.

Returns the grant with which access was granted in case a detailed inspection or logging is required.

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

Tuple Fields of Ok

0: Box<Grant>
Err(Error)

The state machine finished in an error.

The error will be repeated on any following input.

Tuple Fields of Err

0: Error

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.