Package-level declarations

Types

Link copied to clipboard
sealed interface AccessCheck

The outcome of an access check: proceed, or answer the caller with a code and a message.

Link copied to clipboard
class AccessGuard(session: HostSession, policy: AccessPolicy, callerResolver: () -> String? = CallerAttribution::callingPackage)

The three gates every guarded verb passes, in order: the caller resolves to a package, the WebID has a live session, and the caller's grant covers the verb.

Link copied to clipboard
interface AccessPolicy

Decides whether an app may run a verb as a WebID. The host decides through its grants.

Link copied to clipboard
class CachingModuleRootResolver(delegate: ModuleRootResolver, ttlMillis: Long = DEFAULT_TTL_MILLIS, clock: () -> Long = System::currentTimeMillis) : ModuleRootResolver

Remembers a delegate's answers for ttlMillis, because resolving a module's containers reads the type index and a granted app calls many times a second. A container created through the data-module binder is announced with invalidate, so the next check sees it.

Link copied to clipboard

The resolver over the library's two data modules.

Link copied to clipboard

Where a data module lives on an account's pod, so a grant on the module can cover the module's resources when a raw resource verb names one of them.

Link copied to clipboard
data class Requirement(val target: VerbTarget, val level: AccessLevel)

One target a verb needs at one minimum level. A verb with two targets carries two of these.

Link copied to clipboard

The access policy over scoped grants: the effective level for a call is the highest level among the grant entries that cover the call's target, and the call passes when that level includes the verb's minimum.

Link copied to clipboard
object VerbAccess

The minimum level each group of verbs needs, in one place so the binders and the developer docs read the same table.

Link copied to clipboard
sealed interface VerbTarget

What a verb is about, matched against the caller's grant.