@axtary/actionpass 0.0.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,54 +1,149 @@
1
1
  # @axtary/actionpass
2
2
 
3
- Scoped, signed ActionPass artifacts for runtime-governed AI agent actions.
3
+ Scoped, signed and proof-of-possession-bound ActionPass artifacts for runtime-governed AI agent actions.
4
4
 
5
- This is an early package reservation and v0 development build for Axtary. The API is not stable yet.
5
+ Early `0.x` release: the runtime path is real and tested, but the API is not stable yet and may change between minor versions.
6
+
7
+ ```bash
8
+ npm install @axtary/actionpass
9
+ ```
10
+
11
+ The base format lives in `spec/actionpass-v0.md`; the sender-constrained
12
+ `cnf`/DPoP and delegation profile is `spec/actionpass-v1.md`; authenticated
13
+ status distribution is `spec/actionpass-v2.md`.
6
14
 
7
15
  ## What It Does
8
16
 
9
17
  - Validates normalized agent actions at runtime.
10
- - Evaluates a first deterministic GitHub PR policy.
11
18
  - Produces canonical SHA-256 payload hashes.
19
+ - Produces payload-bound approval artifacts for exact human or policy override approvals.
12
20
  - Issues signed ActionPass JWT/JWS artifacts for allowed actions.
13
- - Verifies that a signed pass still matches the exact action payload.
14
- - Records ledger entries with hashable decision evidence.
21
+ - Issues ActionPass v1 bound to a holder key with RFC 7800 `cnf.jkt`.
22
+ - Creates and verifies RFC 9449 DPoP proofs with method/URI/token binding,
23
+ nonce, clock-window, and replay enforcement.
24
+ - Backs replay enforcement with a shared `DpopReplayStore`: an in-process
25
+ `InMemoryDpopReplayStore` and a durable, lock-serialized `FileDpopReplayStore`
26
+ (`0600`) that keeps a captured proof rejected across a verifier restart within
27
+ its window and compacts itself to the in-flight proof window. Single-host
28
+ state, not cross-host distribution.
29
+ - Exchanges a holder-authorized v1 pass for an attenuated child pass, walks
30
+ root-to-leaf delegation chains, enforces remaining depth, and binds the child
31
+ to a distinct sub-agent key.
32
+ - Applies one revocation source across the full delegation chain, so revoking a
33
+ root or intermediate parent invalidates every downstream child without
34
+ enumerating descendants.
35
+ - Binds authority-owned budget reservation cost/limit/state into the pass so a
36
+ presenter cannot alter metering fields.
37
+ - Produces durable local revocation records and rejects revoked passes during
38
+ verification; a revocation-source error also fails closed.
39
+ - Verifies passes against a keyring by `kid` so rotated keys can coexist.
40
+ - Persists local public verification keys and revocations in a JSON trust store.
41
+ - Issues and verifies ActionPass v2 with a signed Token Status List reference,
42
+ freshness-bounded caching, and fail-closed unavailable/stale/invalid status.
43
+ - Uses the IESG-approved Token Status List revision-21 wire format through the
44
+ pinned, stricter `axtary.status-list.v1` profile, so RFC number assignment is
45
+ not a runtime dependency.
46
+ - Validates `axtary.provenance.v0` field/source bindings and binds their
47
+ canonical hash into ActionPasses and ledger records.
48
+ - Persists the issuer ES256 keyring, publishes public JWKS by `kid`, and rotates
49
+ with bounded retired-key overlap.
50
+ - Verifies generic final SSF/CAEP `session-revoked` SETs and maps their explicit
51
+ subjects to live delegation roots without inventing provider support.
52
+ - Verifies that a signed pass and any embedded approval evidence still match the exact action payload.
53
+ - Records ledger entries with hashable decision evidence and parent-to-child
54
+ delegation edges.
55
+ - Owns the provider-neutral native-connector governance descriptors used to
56
+ derive GitHub/Jira/Linear/Postgres/Google Drive capability metadata, normalized evidence dispatch, config
57
+ defaults, and doctor scope/smoke metadata without importing secret-bearing
58
+ adapter runtimes.
15
59
 
16
60
  ## Current Status
17
61
 
18
- Version `0.0.1` is a placeholder/pre-release package. Do not use it for production authorization.
62
+ `0.x` versions are early releases. Do not use them for production authorization yet.
19
63
 
20
64
  Before production use, Axtary still needs:
21
65
 
22
- - A built `dist/` output instead of raw TypeScript exports.
23
66
  - Stable schema versioning.
24
- - Revocation and key rotation.
25
- - Policy package extraction.
67
+ - External/HSM signing-key management.
68
+ - Hosted approval queue integration.
26
69
  - External security review.
27
70
 
28
- ## Example Shape
71
+ The package builds to `dist/` and publishes JavaScript plus TypeScript declarations.
72
+
73
+ ## SDK facade
74
+
75
+ For most callers the `axtary` facade is the simplest entry point: five verbs —
76
+ `authorize`, `verify`, `record`, `revoke`, `explain` — over a flat request
77
+ shape. It delegates to the lower-level functions below and adds no new
78
+ authorization logic.
29
79
 
30
80
  ```ts
81
+ import { axtary } from "@axtary/actionpass";
82
+
83
+ const decision = await axtary.authorize({
84
+ agent: "codex-prod",
85
+ human: "user@company.com",
86
+ intent: "Open a PR for Linear issue AXT-418",
87
+ tool: "github.pull_requests.create",
88
+ resource: "repo:company/web-app",
89
+ payload,
90
+ });
91
+
92
+ if (decision.status === "allow") {
93
+ await github.createPullRequest(payload);
94
+ }
95
+ ```
96
+
97
+ With no signing key configured, the facade signs with a **persistent local dev
98
+ key** (`AXTARY_DEV_SIGNING_KEY`, else a `0600` keyring file under `.axtary/`), so
99
+ quickstart passes verify across restarts with zero key code. Call
100
+ `devKeypair()` to obtain that keypair explicitly, or
101
+ `createAxtary({ issuer, signingKey, verificationKey })` to use your own issuer
102
+ key in production. See the [SDK guide](https://docs.axtary.com/sdk).
103
+
104
+ ## Quickstart (low-level functions)
105
+
106
+ This example runs as-is with Node 20+:
107
+
108
+ ```ts
109
+ import { generateKeyPair } from "jose";
31
110
  import {
32
111
  authorize,
112
+ createApprovalArtifact,
33
113
  demoAction,
34
114
  verifyActionPass,
35
115
  } from "@axtary/actionpass";
36
116
 
117
+ const { publicKey, privateKey } = await generateKeyPair("ES256");
118
+
119
+ // Bind a human approval to the exact payload hash.
120
+ const { artifact } = createApprovalArtifact({
121
+ action: demoAction,
122
+ mode: "human",
123
+ approvedBy: "user:reviewer@example.com",
124
+ reason: "Reviewed the exact PR payload",
125
+ });
126
+
127
+ // Evaluate policy, issue a signed ActionPass, produce a ledger record.
37
128
  const result = await authorize({
38
129
  action: demoAction,
39
- issuer: "https://api.axtary.dev",
40
- tenant: "org:company",
41
- signingKey,
130
+ issuer: "https://axtary.local",
131
+ tenant: "org:example",
132
+ signingKey: privateKey,
133
+ approvalArtifact: artifact,
42
134
  });
43
135
 
44
- if (result.actionPass) {
45
- const verified = await verifyActionPass({
46
- token: result.actionPass.token,
47
- action: demoAction,
48
- verificationKey,
49
- issuer: "https://api.axtary.dev",
50
- });
51
- }
136
+ console.log(result.decision.decision, result.payloadHash);
137
+
138
+ // Verification fails closed on expiry, revocation, or payload mismatch.
139
+ const verified = await verifyActionPass({
140
+ token: result.actionPass.token,
141
+ action: demoAction,
142
+ verificationKey: publicKey,
143
+ issuer: "https://axtary.local",
144
+ });
145
+
146
+ console.log(verified.valid);
52
147
  ```
53
148
 
54
149
  ## Security Notes
@@ -58,7 +153,25 @@ ActionPass is designed to fail closed:
58
153
  - Malformed actions fail schema validation.
59
154
  - Denied and step-up actions do not receive passes.
60
155
  - Verification rejects expired tokens.
156
+ - Verification rejects revoked pass IDs.
157
+ - Delegation verification checks every root-to-leaf member against the same
158
+ revocation source; an ancestor revoke cascades to all descendants.
159
+ - Verification rejects when a configured revocation source cannot be queried;
160
+ it never treats source failure as an empty set.
61
161
  - Verification rejects payload hash mismatches.
162
+ - Pass issuance rejects approval artifacts that were created for a different action or payload.
163
+ - Keyring verification fails closed when the JWT `kid` is unknown.
164
+ - The local trust store is atomically written with mode `0600`. It persists
165
+ public verification JWKs and local revocation records only; signing keys
166
+ should remain in KMS, env-managed dev secrets, or another controlled key
167
+ custodian.
168
+ - Local revocation records still rely on the trusted filesystem boundary.
169
+ ActionPass v2 additionally publishes signed freshness-bounded status evidence
170
+ for independent/multi-process verification.
62
171
  - Verification binds agent, human owner, runtime, task, tool, resource, and payload hash.
172
+ - V1 verification additionally requires the holder key, fresh proof target,
173
+ exact ActionPass hash, and one-time proof `jti`.
174
+ - V2 verification additionally requires authenticated fresh status evidence;
175
+ status-source failure or stale evidence blocks execution.
63
176
 
64
177
  Signing currently defaults to `ES256`.
package/dist/caep.d.ts ADDED
@@ -0,0 +1,89 @@
1
+ import { type CryptoKey, type JWK, type KeyObject } from "jose";
2
+ import { z } from "zod";
3
+ export declare const SSF_SET_TYP = "secevent+jwt";
4
+ export declare const CAEP_SESSION_REVOKED_EVENT = "https://schemas.openid.net/secevent/caep/event-type/session-revoked";
5
+ export declare const CAEP_MAPPING_STORE_VERSION = "axtary.caep_mapping_store.v0";
6
+ export declare const SSF_REPLAY_STORE_VERSION = "axtary.ssf_replay_store.v0";
7
+ export declare const SsfSubjectIdentifierSchema: z.ZodObject<{
8
+ format: z.ZodString;
9
+ }, z.core.$catchall<z.ZodType<string | number | boolean | Record<string, unknown> | unknown[] | null, unknown, z.core.$ZodTypeInternals<string | number | boolean | Record<string, unknown> | unknown[] | null, unknown>>>>;
10
+ export type SsfSubjectIdentifier = z.infer<typeof SsfSubjectIdentifierSchema>;
11
+ export declare const CaepSessionRevokedClaimsSchema: z.ZodObject<{
12
+ iss: z.ZodString;
13
+ aud: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
14
+ iat: z.ZodNumber;
15
+ jti: z.ZodString;
16
+ txn: z.ZodOptional<z.ZodString>;
17
+ sub_id: z.ZodObject<{
18
+ format: z.ZodString;
19
+ }, z.core.$catchall<z.ZodType<string | number | boolean | Record<string, unknown> | unknown[] | null, unknown, z.core.$ZodTypeInternals<string | number | boolean | Record<string, unknown> | unknown[] | null, unknown>>>>;
20
+ events: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<string | number | boolean | Record<string, unknown> | unknown[] | null, unknown, z.core.$ZodTypeInternals<string | number | boolean | Record<string, unknown> | unknown[] | null, unknown>>>>;
21
+ }, z.core.$strip>;
22
+ export type CaepSessionRevokedClaims = z.infer<typeof CaepSessionRevokedClaimsSchema>;
23
+ export declare const CaepMappingSchema: z.ZodObject<{
24
+ transmitterIssuer: z.ZodString;
25
+ subjectKey: z.ZodString;
26
+ rootPassIds: z.ZodArray<z.ZodString>;
27
+ createdAt: z.ZodString;
28
+ }, z.core.$strip>;
29
+ export type CaepMapping = z.infer<typeof CaepMappingSchema>;
30
+ export declare const CaepMappingStoreSchema: z.ZodObject<{
31
+ schemaVersion: z.ZodLiteral<"axtary.caep_mapping_store.v0">;
32
+ mappings: z.ZodArray<z.ZodObject<{
33
+ transmitterIssuer: z.ZodString;
34
+ subjectKey: z.ZodString;
35
+ rootPassIds: z.ZodArray<z.ZodString>;
36
+ createdAt: z.ZodString;
37
+ }, z.core.$strip>>;
38
+ }, z.core.$strip>;
39
+ export type CaepMappingStoreData = z.infer<typeof CaepMappingStoreSchema>;
40
+ export declare function ssfSubjectKey(subjectInput: SsfSubjectIdentifier): string;
41
+ export declare function verifyCaepSessionRevoked(input: {
42
+ token: string;
43
+ issuer: string;
44
+ audience: string;
45
+ verificationKeys?: Readonly<Record<string, JWK | KeyObject | CryptoKey | Uint8Array>> | ((kid: string | undefined) => JWK | KeyObject | CryptoKey | Uint8Array | undefined | Promise<JWK | KeyObject | CryptoKey | Uint8Array | undefined>);
46
+ jwksUri?: string;
47
+ currentDate?: Date;
48
+ maxAgeSeconds?: number;
49
+ }): Promise<CaepSessionRevokedClaims>;
50
+ export declare class LocalCaepMappingStore {
51
+ readonly filePath: string;
52
+ constructor(filePath: string);
53
+ read(): Promise<CaepMappingStoreData>;
54
+ put(input: {
55
+ transmitterIssuer: string;
56
+ subject: SsfSubjectIdentifier;
57
+ rootPassIds: string[];
58
+ createdAt?: Date;
59
+ }): Promise<CaepMapping>;
60
+ rootsFor(transmitterIssuer: string, subject: SsfSubjectIdentifier): Promise<string[]>;
61
+ }
62
+ export declare class LocalSsfReplayStore {
63
+ readonly filePath: string;
64
+ constructor(filePath: string);
65
+ consume(issuer: string, eventId: string, now?: Date, retentionSeconds?: number): Promise<boolean>;
66
+ processOnce<T>(issuer: string, eventId: string, operation: () => Promise<T>, now?: Date, retentionSeconds?: number): Promise<{
67
+ processed: true;
68
+ result: T;
69
+ } | {
70
+ processed: false;
71
+ }>;
72
+ }
73
+ export declare function processCaepSessionRevoked(input: {
74
+ token: string;
75
+ issuer: string;
76
+ audience: string;
77
+ verificationKeys?: Readonly<Record<string, JWK | KeyObject | CryptoKey | Uint8Array>> | ((kid: string | undefined) => JWK | KeyObject | CryptoKey | Uint8Array | undefined | Promise<JWK | KeyObject | CryptoKey | Uint8Array | undefined>);
78
+ jwksUri?: string;
79
+ mappingStore: LocalCaepMappingStore;
80
+ replayStore: LocalSsfReplayStore;
81
+ revoke: (rootPassId: string, claims: CaepSessionRevokedClaims) => Promise<void>;
82
+ currentDate?: Date;
83
+ }): Promise<{
84
+ eventId: string;
85
+ subjectKey: string;
86
+ rootPassIds: string[];
87
+ status: "applied" | "unmapped" | "replayed";
88
+ }>;
89
+ //# sourceMappingURL=caep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"caep.d.ts","sourceRoot":"","sources":["../src/caep.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,GAAG,EAER,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAC1C,eAAO,MAAM,0BAA0B,wEACgC,CAAC;AACxE,eAAO,MAAM,0BAA0B,iCAAiC,CAAC;AACzE,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AAerE,eAAO,MAAM,0BAA0B;;2NAIX,CAAC;AAC7B,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,8BAA8B;;;;;;;;;;iBAQzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAA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