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
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 strThe to-be-authenticated client.
passdata: Option<&'machine [u8]>The supplied passdata/password.
The issuer should try to recover the grant for this code
Fulfilled by Input::Recovered.
Fields of Recover
code: &'machine strThe code from current request
The extension (if any) should provide the extensions
Fullfilled by Input::Extended
Fields of Extend
extensions: &'machine mut ExtensionsThe grant extensions if any
The issue should issue a new access token
Fullfilled by Input::Issued
Fields of Issue
grant: &'machine GrantThe grant to be used in the token generation
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.
Tuple Fields of Ok
0: BearerTokenThe state machine finished in an error.
The error will be repeated on any following input.