Type alias AuthDescriptorValidator

AuthDescriptorValidator: {
    hasExpired: ((authDescriptor) => Promise<boolean>);
    isActive: ((authDescriptor) => Promise<boolean>);
}

Type declaration

  • hasExpired: ((authDescriptor) => Promise<boolean>)

    Verifies if the auth descriptor has expired or not. An auth descriptor has expired if the rules specified by the auth descriptor are violated in such a way that they will never be valid again, e.g., maximum number of operations reached.

      • (authDescriptor): Promise<boolean>
      • Parameters

        Returns Promise<boolean>

  • isActive: ((authDescriptor) => Promise<boolean>)

    Verifies if the auth descriptor is active or not. An auth descriptor is active if it has been enforced at least once. I.e., an auth descriptor will be active and expired at the same time when it expire. The only time an auth descriptor will not be active is if it has rules such that it will become valid in the future.

      • (authDescriptor): Promise<boolean>
      • Parameters

        Returns Promise<boolean>