Options
All
  • Public
  • Public/Protected
  • All
Menu

Validates ownership of a WebId by seeing if a specific triple can be added. expiration parameter is how long the token should be valid in minutes.

Hierarchy

Index

Constructors

constructor

Properties

Private Readonly converter

Private Readonly expiration

expiration: number

Protected Readonly logger

logger: Logger = ...

Private Readonly storage

storage: ExpiringStorage<string, string>

Methods

canHandle

  • canHandle(input: { webId: string }): Promise<void>
  • Checks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.

    Parameters

    • input: { webId: string }

      Input that could potentially be handled.

      • webId: string

    Returns Promise<void>

    A promise resolving if the input can be handled, rejecting with an Error if not.

Private generateToken

  • generateToken(): string

Private getTokenKey

  • getTokenKey(webId: string): string

handle

  • handle(__namedParameters: { webId: string }): Promise<void>

handleSafe

  • handleSafe(input: { webId: string }): Promise<void>

Private hasToken

  • hasToken(webId: string, token: string): Promise<boolean>

Private throwError

  • throwError(webId: string, token: string): never