clear Session
Signs the current end user out on this device by ending the Client Auth session behind this instance.
The in-memory token is dropped and its persisted copy deleted, so neither this Portal nor a later io.portalhq.android.auth.PortalAuth.restoreSession can hand that token out again.
Afterwards this instance is spent: every authenticated call fails with io.portalhq.android.exceptions.PortalCredentialErrorReason.SESSION_INVALIDATED. Construct a new Portal from the next sign-in rather than reusing this one.
This is a local sign-out. No server-side revoke exists, so the token stays valid until the backend expires it, and a copy the host application made elsewhere is out of reach.
On a Portal built from a Client API Key this call does nothing: there is no session and no local state to drop, and the key is custodian-owned and remains valid.
To clear a persisted session when no Portal is available — recovering from corrupt storage, or clearing a leftover before a fresh sign-in — use io.portalhq.android.auth.PortalAuth.clearPersistedSession.
Deliberately does not fire onSessionInvalidated: the host asked for this sign-out and already knows about it.
Throws
when the persisted copy cannot be deleted. The in-memory token is dropped either way.