Function MockCredentialStore.save
Save a new credential.
override CredentialStatus save(
scope ref const(SecretBuffer) secret,
out CredentialHandle handle
) @safe;
Persist handle.serialize() in normal application settings so the credential can be found again on the next run.
Parameters
| Name | Description |
|---|---|
| secret | Credential to save. |
| handle | Receives the non-secret handle on success. |
Returns
ok on success. handle is invalid for any other result.
Examples
CredentialHandle handle;
auto status = store .save(secret, handle);
if (status == CredentialStatus .ok)
settings .credentialHandle = handle .serialize();