HostSession

interface HostSession

What the binders need to know about the host's signed-in accounts, and nothing more.

The account store loads asynchronously, so every answer waits for awaitReady first; asking before that would report a signed-in user as absent. AuthenticatorHostSession is the implementation over the library's Authenticator; tests supply their own.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun awaitReady()

Suspends until the account store has loaded. Cheap once it has.

Link copied to clipboard
abstract suspend fun hasLoggedIn(): Boolean

true when at least one account holds a usable session.

Link copied to clipboard
abstract suspend fun hasSession(webId: String): Boolean

true when webId is signed in and its session has not expired.

Link copied to clipboard
abstract suspend fun profileDocument(webId: String): WebId?

The parsed WebID profile document of webId, or null when it is not signed in.