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

pub enum Output<'a> {
    Unauthenticated {
        client: &'a str,
        pass: Option<&'a [u8]>,
    },
    RecoverRefresh {
        token: &'a str,
    },
    Refresh {
        token: &'a str,
        grant: Box<Grant>,
    },
    Ok(BearerToken),
    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

Unauthenticated

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 Unauthenticated

client: &'a str

The to-be-authenticated client.

pass: Option<&'a [u8]>

The supplied passdata/password.

RecoverRefresh

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

Fulfilled by Input::Recovered.

Fields of RecoverRefresh

token: &'a str

The token supplied by the client.

Refresh

The issuer should issue a refreshed code grant token.

Fulfilled by Input::Refreshed.

Fields of Refresh

token: &'a str

The refresh token that has been used.

grant: Box<Grant>

The grant that should be issued as determined.

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(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

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 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.