AuthorizeProtocol

The host's half of the SolidAuthorization Intent protocol.

A consent activity reads the request with requestFrom, lets the user decide, resolves what they approved into entries with entriesFor, and finishes with one of the three results. The SDK's AuthorizeWithSolid contract is the other half.

Functions

Link copied to clipboard

RESULT_CANCELED: the user dismissed without granting.

Link copied to clipboard
fun entriesFor(request: AccessRequest, storageRoots: List<String>): List<GrantEntry>

The entries a request becomes once the account is known: the whole pod, each path resolved against every storage root in storageRoots, and each module. Paths that cannot be placed are dropped, and duplicates collapse.

Link copied to clipboard
fun errorResult(code: Int, message: String): AuthorizeResult

RESULT_ERROR with an ExceptionsErrorCode value and a message.

Link copied to clipboard

RESULT_OK with the chosen WebID and the grant the user approved.

Link copied to clipboard

The request the calling app sent, or AccessRequest.DEFAULT when it sent none.