Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "internal/signing/goalSigning"

Index

Variables

Const DefaultGoalSigningAlgorithm

DefaultGoalSigningAlgorithm: GoalSigningAlgorithm<string> = RsaGoalSigningAlgorithm

Functions

findAlgorithm

  • findAlgorithm(key: GoalVerificationKey<any> | GoalSigningKey<any>, gsc: GoalSigningConfiguration): GoalSigningAlgorithm<any>
  • Parameters

    • key: GoalVerificationKey<any> | GoalSigningKey<any>
    • gsc: GoalSigningConfiguration

    Returns GoalSigningAlgorithm<any>

isGoalRejected

  • isGoalRejected(sdmGoal: SdmGoalEvent): boolean

isInScope

  • isInScope(scope: GoalSigningScope, ctx: HandlerContext): boolean

normalizeGoal

  • normalizeGoal(goal: SdmGoalMessage | SdmGoalEvent): string

normalizeValue

  • normalizeValue(value: any): any

rejectGoal

  • rejectGoal(reason: string, sdmGoal: SdmGoalEvent, ctx: HandlerContext): Promise<void>

signGoal

  • signGoal(goal: SdmGoalMessage, gsc: GoalSigningConfiguration): Promise<SdmGoalMessage & SignatureMixin>

verifyGoal

  • verifyGoal(goal: SdmGoalEvent & DeepPartial<SignatureMixin>, gsc: GoalSigningConfiguration, ctx: HandlerContext): Promise<void>
  • Verify a goal signature against the public keys configured in provided Configuration. If signature can't be verified, the goal will be marked as failed and an Error will be thrown.

    Parameters

    • goal: SdmGoalEvent & DeepPartial<SignatureMixin>

      goal to verify

    • gsc: GoalSigningConfiguration

      signing configuration

    • ctx: HandlerContext

    Returns Promise<void>

Generated using TypeDoc