import { OpenId4VciCredentialRequestToCredentialMapper, OpenId4VciDeferredCredentialRequestToCredentialMapper, OpenId4VciGetChainedAuthorizationRequestParameters, OpenId4VciGetVerificationSession } from "./OpenId4VcIssuerServiceOptions.mjs"; import { Express } from "express"; //#region src/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.ts interface InternalOpenId4VcIssuerModuleConfigOptions { /** * Base url at which the issuer endpoints will be hosted. All endpoints will be exposed with * this path as prefix. */ baseUrl: string; /** * Express app on which the openid4vci endpoints will be registered. */ app: Express; /** * The time after which a cNonce will expire. * * @default 60 (1 minute) */ cNonceExpiresInSeconds?: number; /** * The time after which a stateful credential offer not bound to a subject expires. Once the offer has been bound * to a subject the access token expiration takes effect. This is to prevent long-lived `pre-authorized_code` and * `issuer_state` values. * * @default 180 (3 minutes) */ statefulCredentialOfferExpirationInSeconds?: number; /** * For how long should the issuance session be kept alive after the deferral interval * has passed. This is to allow for allow some time for the holder to recheck whether * the credential is ready or not. * * @default 604800 (7 days) */ deferralIntervalGracePeriodInSeconds?: number; /** * The time after which an authorization code will expire. * * @default 60 (1 minute) */ authorizationCodeExpiresInSeconds?: number; /** * The time after which an access token will expire. * * @default 180 (3 minutes) */ accessTokenExpiresInSeconds?: number; /** * The time after which a refresh token will expire. * * @default 7776000 (90 days) */ refreshTokenExpiresInSeconds?: number; /** * The time after which a pushed authorization request URI will expire. * * @default 60 (1 minute) */ requestUriExpiresInSeconds?: number; /** * Whether DPoP is required for all issuance sessions. This value can be overridden when creating * a credential offer. If dpop is not required, but used by a client in the first request to credo, * DPoP will be required going forward. * * @default false */ dpopRequired?: boolean; /** * Whether wallet attestations are required for all issuance sessions. This value can be overridden when creating * a credential offer, but will have effect for dynamic issuance sessions. If wallet attestations are not required * but used by a client in the first request to credo, * wallet attestations will be required going forward. * * @default false */ walletAttestationsRequired?: boolean; /** * Whether to allow dynamic issuance sessions based on a credential request. * * This requires an external authorization server which issues access tokens without * a `pre-authorized_code` or `issuer_state` parameter. * * Credo only support stateful credential offer sessions (pre-auth or presentation during issuance) * * @default false */ allowDynamicIssuanceSessions?: boolean; /** * A function mapping a credential request to the credential to be issued. * * When multiple credentials are returned it is recommended to use different or approximate issuance and expiration * times to prevent correlation based on the specific time */ credentialRequestToCredentialMapper: OpenId4VciCredentialRequestToCredentialMapper; /** * A function mapping a deferred credential request to the credential to be issued. * * When multiple credentials are returned it is recommended to use different or approximate issuance and expiration * times to prevent correlation based on the specific time */ deferredCredentialRequestToCredentialMapper?: OpenId4VciDeferredCredentialRequestToCredentialMapper; /** * @deprecated use `getVerificationSession` instead. */ getVerificationSessionForIssuanceSessionAuthorization?: OpenId4VciGetVerificationSession; /** * Callback to get a verification session that needs to be fulfilled for the authorization of * of a credential issuance session. Once the verification session has been completed the user can * retrieve an authorization code and access token and retrieve the credential(s). * * Required if presentation during issuance flow is used */ getVerificationSession?: OpenId4VciGetVerificationSession; /** * Callback to get additional details for the chained authorization server flow. * This will be called when a credential offer request is configured to use a chained * authorization server, but the scopesMapping configuration is not defined. * * Required if chained authorization server flow is used without a static scopes mapping configuration. */ getChainedAuthorizationRequestParameters?: OpenId4VciGetChainedAuthorizationRequestParameters; /** * Custom the paths used for endpoints */ endpoints?: { /** * @default /nonce */ nonce?: string; /** * @default /challenge */ authorizationChallenge?: string; /** * @default /offers */ credentialOffer?: string; /** * @default /credential */ credential?: string; /** * @default /deferred-credential */ deferredCredential?: string; /** * @default /token */ accessToken?: string; /** * @default /par */ pushedAuthorizationRequest?: string; /** * @default /authorize */ authorization?: string; /** * @default /redirect */ redirect?: string; /** * @default /jwks */ jwks: string; }; } declare class OpenId4VcIssuerModuleConfig { private options; /** * Callback to get a verification session that needs to be fulfilled for the authorization of * of a credential issuance session. Once the verification session has been completed the user can * retrieve an authorization code and access token and retrieve the credential(s). * * Required if presentation during issuance flow is used */ getVerificationSession?: OpenId4VciGetVerificationSession; /** * Callback to get additional details for the chained authorization server flow. * This will be called when a credential offer request is configured to use a chained * authorization server. If not defined, `scopesMapping` and `redirectUris` from * the authorization server configuration will be used. * * Required if chained authorization server flow is used without a static scopes mapping configuration. */ getChainedAuthorizationRequestParameters?: OpenId4VciGetChainedAuthorizationRequestParameters; constructor(options: InternalOpenId4VcIssuerModuleConfigOptions); get app(): Express; get baseUrl(): string; /** * A function mapping a credential request to the credential to be issued. */ get credentialRequestToCredentialMapper(): OpenId4VciCredentialRequestToCredentialMapper; /** * A function mapping a credential request to the credential to be issued. */ get deferredCredentialRequestToCredentialMapper(): OpenId4VciDeferredCredentialRequestToCredentialMapper | undefined; /** * The time after which a cNone will expire. * * @default 60 (1 minute) */ get cNonceExpiresInSeconds(): number; /** * The time after which a stateful credential offer not bound to a subject expires. Once the offer has been bound * to a subject the access token expiration takes effect. This is to prevent long-lived `pre-authorized_code` and * `issuer_state` values. * * @default 360 (5 minutes) */ get statefulCredentialOfferExpirationInSeconds(): number; /** * For how long should the issuance session be kept alive after the deferral interval * has passed. This is to allow for allow some time for the holder to recheck whether * the credential is ready or not. * * @default 604800 (7 days) */ get deferralIntervalGracePeriodInSeconds(): number; /** * The time after which a cNonce will expire. * * @default 60 (1 minute) */ get authorizationCodeExpiresInSeconds(): number; /** * The time after which an access token will expire. * * @default 180 (3 minutes) */ get accessTokenExpiresInSeconds(): number; /** * The time after which a refresh token will expire. * * @default 7776000 (90 days) */ get refreshTokenExpiresInSeconds(): number; /** * The time after which a pushed authorization request URI will expire. * * @default 60 (1 minute) */ get requestUriExpiresInSeconds(): number; /** * Whether DPoP is required for all issuance sessions. This value can be overridden when creating * a credential offer. If dpop is not required, but used by a client in the first request to credo, * DPoP will be required going forward. * * @default false */ get dpopRequired(): boolean; /** * Whether wallet attestations are required for all issuance sessions. This value can be overridden when creating * a credential offer, but will have effect for dynamic issuance sessions. If wallet attestations are not required * but used by a client in the first request to credo, * wallet attestations will be required going forward. * * @default false */ get walletAttestationsRequired(): boolean; /** * Whether to allow dynamic issuance sessions based on a credential request. * * This requires an external authorization server which issues access tokens without * a `pre-authorized_code` or `issuer_state` parameter. * * Credo only supports stateful credential offer sessions (pre-auth or presentation during issuance) * * @default false */ get allowDynamicIssuanceSessions(): boolean; /** * @default /nonce */ get nonceEndpointPath(): string; /** * @default /par */ get pushedAuthorizationRequestEndpoint(): string; /** * @default /authorize */ get authorizationEndpoint(): string; /** * @default /redirect */ get redirectEndpoint(): string; /** * @default /challenge */ get authorizationChallengeEndpointPath(): string; /** * @default /offers */ get credentialOfferEndpointPath(): string; /** * @default /credential */ get credentialEndpointPath(): string; /** * @default /deferred-credential */ get deferredCredentialEndpointPath(): string; /** * @default /token */ get accessTokenEndpointPath(): string; /** * @default /jwks */ get jwksEndpointPath(): string; /** * @deprecated use `getVerificationSession` instead. */ get getVerificationSessionForIssuanceSessionAuthorization(): OpenId4VciGetVerificationSession | undefined; /** * @deprecated use `getVerificationSession` instead. */ set getVerificationSessionForIssuanceSessionAuthorization(value: OpenId4VciGetVerificationSession | undefined); } //#endregion export { InternalOpenId4VcIssuerModuleConfigOptions, OpenId4VcIssuerModuleConfig }; //# sourceMappingURL=OpenId4VcIssuerModuleConfig.d.mts.map