{"version":3,"file":"OpenId4VcVerifierModuleConfig.mjs","names":[],"sources":["../../src/openid4vc-verifier/OpenId4VcVerifierModuleConfig.ts"],"sourcesContent":["import type { Express } from 'express'\n\nexport interface InternalOpenId4VcVerifierModuleConfigOptions {\n  /**\n   * Base url at which the verifier endpoints will be hosted. All endpoints will be exposed with\n   * this path as prefix.\n   */\n  baseUrl: string\n\n  /**\n   * Express app on which the openid4vp endpoints will be registered.\n   */\n  app: Express\n\n  /**\n   * The number of seconds after which a created authorization request will expire.\n   *\n   * This is used for the `exp` field of a signed authorization request.\n   *\n   * @default 300\n   */\n  authorizationRequestExpirationInSeconds?: number\n\n  endpoints?: {\n    /**\n     * @default /authorize\n     */\n    authorization?: string\n\n    /**\n     * @default /authorization-requests\n     */\n    authorizationRequest?: string\n  }\n}\n\nexport class OpenId4VcVerifierModuleConfig {\n  private options: InternalOpenId4VcVerifierModuleConfigOptions\n\n  public constructor(options: InternalOpenId4VcVerifierModuleConfigOptions) {\n    this.options = options\n  }\n\n  public get baseUrl() {\n    return this.options.baseUrl\n  }\n\n  public get app() {\n    return this.options.app\n  }\n\n  /**\n   * @default /authorize\n   */\n  public get authorizationRequestEndpoint(): string {\n    return this.options.endpoints?.authorizationRequest ?? '/authorization-requests'\n  }\n\n  /**\n   * @default /authorize\n   */\n  public get authorizationEndpoint(): string {\n    return this.options.endpoints?.authorization ?? '/authorize'\n  }\n\n  /**\n   * Time in seconds after which an authorization request will expire\n   *\n   * @default 300\n   */\n  public get authorizationRequestExpiresInSeconds() {\n    return this.options.authorizationRequestExpirationInSeconds ?? 300\n  }\n}\n"],"mappings":";AAoCA,IAAa,gCAAb,MAA2C;CAGzC,AAAO,YAAY,SAAuD;AACxE,OAAK,UAAU;;CAGjB,IAAW,UAAU;AACnB,SAAO,KAAK,QAAQ;;CAGtB,IAAW,MAAM;AACf,SAAO,KAAK,QAAQ;;;;;CAMtB,IAAW,+BAAuC;AAChD,SAAO,KAAK,QAAQ,WAAW,wBAAwB;;;;;CAMzD,IAAW,wBAAgC;AACzC,SAAO,KAAK,QAAQ,WAAW,iBAAiB;;;;;;;CAQlD,IAAW,uCAAuC;AAChD,SAAO,KAAK,QAAQ,2CAA2C"}