mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00

These readers will determine which permissions are available for the incoming credentials. Their results then get combined in a UnionReader and authorized in a PermissionBasedAuthorizer
21 lines
727 B
TypeScript
21 lines
727 B
TypeScript
import type { CredentialSet } from '../authentication/Credentials';
|
|
import type { PermissionSet } from '../ldp/permissions/Permissions';
|
|
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
|
|
import { AsyncHandler } from '../util/handlers/AsyncHandler';
|
|
|
|
export interface PermissionReaderInput {
|
|
/**
|
|
* Credentials of the entity that wants to use the resource.
|
|
*/
|
|
credentials: CredentialSet;
|
|
/**
|
|
* Identifier of the resource that will be read/modified.
|
|
*/
|
|
identifier: ResourceIdentifier;
|
|
}
|
|
|
|
/**
|
|
* Discovers the permissions of the given credentials on the given identifier.
|
|
*/
|
|
export abstract class PermissionReader extends AsyncHandler<PermissionReaderInput, PermissionSet> {}
|