Struct CredentialHandle
Reference to one saved credential.
struct CredentialHandle;
Save serialize() in normal application settings. On the next run, rebuild the handle with tryParse() and pass it back to the same kind of credential store.
Do not inspect or build handle strings yourself.
Properties
| Name | Type | Description |
|---|---|---|
valid[get]
|
bool | Whether this handle can be passed to a credential store. |
Methods
| Name | Description |
|---|---|
serialize
()
|
Return the value to persist in normal application settings. |
tryParse
(text, handle)
|
Restore a handle previously returned by serialize(). |
Examples
CredentialHandle handle;
if (store .save(secret, handle) == CredentialStatus .ok)
settings .tokenHandle = handle .serialize();
CredentialHandle restored;
if (CredentialHandle .tryParse(settings .tokenHandle, restored))
store .withSecret(restored, callback);