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
RecoverRefresh
The issuer should try to recover the grant of a refresh token.
Fulfilled by Input::Recovered
.
Refresh
The issuer should issue a refreshed code grant token.
Fulfilled by Input::Refreshed
.
Fields
Ok(BearerToken)
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.
Err(Error)
The state machine finished in an error.
The error will be repeated on any following input.