pub trait IssuerConnector {
// Required methods
fn capabilities(&self) -> Vec<Class>;
fn verify(&mut self, credential: &Credential) -> Result<(), IssuerError>;
fn create(&mut self, name: &str) -> Result<Credential, IssuerError>;
fn set_value(&mut self, name: &str, value: &str) -> Result<(), IssuerError>;
fn roll(&mut self, current: &Credential) -> Result<Credential, IssuerError>;
fn revoke(&mut self, credential: &Credential) -> Result<(), IssuerError>;
fn reconcile(
&mut self,
step: &StepKind,
name: &str,
) -> Result<Reconcile, IssuerError>;
// Provided method
fn set_target(&self, _current_id: &str, run_name: &str) -> String { ... }
}Required Methods§
fn capabilities(&self) -> Vec<Class>
Sourcefn verify(&mut self, credential: &Credential) -> Result<(), IssuerError>
fn verify(&mut self, credential: &Credential) -> Result<(), IssuerError>
Does this credential work at the issuer right now?
Sourcefn create(&mut self, name: &str) -> Result<Credential, IssuerError>
fn create(&mut self, name: &str) -> Result<Credential, IssuerError>
Overlapping: make a new credential called name (the name carries the entry, generation and
run id, so it can be found again).
Sourcefn set_value(&mut self, name: &str, value: &str) -> Result<(), IssuerError>
fn set_value(&mut self, name: &str, value: &str) -> Result<(), IssuerError>
Client-generated: tell the issuer to use value for name. Idempotent.
Sourcefn roll(&mut self, current: &Credential) -> Result<Credential, IssuerError>
fn roll(&mut self, current: &Credential) -> Result<Credential, IssuerError>
Provider-generated: roll current in place. The old value stops working.
Sourcefn revoke(&mut self, credential: &Credential) -> Result<(), IssuerError>
fn revoke(&mut self, credential: &Credential) -> Result<(), IssuerError>
Remove a credential. Called last, and only when the revoke rule is met.
Provided Methods§
Sourcefn set_target(&self, _current_id: &str, run_name: &str) -> String
fn set_target(&self, _current_id: &str, run_name: &str) -> String
Client-generated: what the new credential is called at the issuer. The default is the run’s
name; a connector with fixed identities (two database roles taking turns) returns the one
that is not current_id.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".