PasskeyResult
Outcome of a passkey operation: either Success with a value or Failure with a typed PasskeyError.
Closed: it is always one of these two; a when over it needs no else branch.
Samples
passkeys.signIn(server.authenticationOptions()).fold(
onSuccess = { server.finishSignIn(it.json); SignInState.SignedIn },
onFailure = { if (it.isUserCancellation) SignInState.Idle else SignInState.Failed(it.message) },
)Inheritors
Types
Properties
True for PasskeyResult.Failure.
True for PasskeyResult.Success.
Functions
Returns the error on failure, or null on success.
Returns the value on success, or throws a PasskeyException carrying the error.
Transforms the value on success; failures pass through unchanged.
Transforms the error on failure, e.g. into another PasskeyError; successes pass through unchanged.
Runs action with the error if this is a PasskeyResult.Failure; returns this result unchanged.
Runs action with the value if this is a PasskeyResult.Success; returns this result unchanged.
The same outcome as a kotlin.Result; a failure holds a PasskeyException whose error is the original error. For code built around Result (e.g. runCatching chains).