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

NameTypeDescription
valid[get] boolWhether this handle can be passed to a credential store.

Methods

NameDescription
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);