pub trait Issuer: Send + Sync {
// Required method
fn issue<'life0, 'async_trait>(
&'life0 self,
request: IssueRequest,
) -> Pin<Box<dyn Future<Output = Result<Value, IssuerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Mints the credential a client receives once its device code is approved.
It is called exactly once per approved request — the poll that wins
the guarded approved → consumed update calls it, and a poll that
loses the race is told expired_token rather than given a second
credential. An issuer that fails leaves the code spent and the
credential unminted: the person re-runs the client. That is deliberate;
see docs/DEVICE-AUTH.md.
Required Methods§
Sourcefn issue<'life0, 'async_trait>(
&'life0 self,
request: IssueRequest,
) -> Pin<Box<dyn Future<Output = Result<Value, IssuerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn issue<'life0, 'async_trait>(
&'life0 self,
request: IssueRequest,
) -> Pin<Box<dyn Future<Output = Result<Value, IssuerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Mints the credential, returning the JSON body the client receives.
§Errors
Whatever the venture’s key-minting could not do. The caller answers
500 and the device code stays consumed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".