Struct oxide_auth::code_grant::accesstoken::AccessToken [−][src]
pub struct AccessToken { /* fields omitted */ }Expand description
Access token issuing process
This state machine will go through four phases. On creation, the request will be validated and
parameters for the first step will be extracted from it. It will pose some requests in the form
of Output which should be satisfied with the next Input data. This will eventually
produce a BearerToken or an Error. Note that the executing environment will need to use
a Registrar, an Authorizer, an optionnal Extension and an Issuer to which some
requests should be forwarded.
Issuer ../primitives/issuer/trait.Issuer.html
Registrar ../primitives/registrar/trait.Registrar.html
Authorizer ../primitives/authorizer/trait.Authorizer.html
Extension trait.Extension.html
A rough sketch of the operational phases:
- Ensure the request is valid based on the basic requirements (includes required parameters)
- Try to produce a new token
2.1. Authenticate the client
2.2. If there was no authentication, assert token does not require authentication
2.3. Recover the current grant corresponding to the
code2.4. Check the intrinsic validity (scope) - Query the backend for a new (bearer) token