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:

  1. Ensure the request is valid based on the basic requirements (includes required parameters)
  2. 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 code 2.4. Check the intrinsic validity (scope)
  3. Query the backend for a new (bearer) token

Implementations

Create the state machine. validating the request in the process

Go to next state

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.