@apoa/core 0.1.2 → 0.2.1

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/dist/index.d.cts CHANGED
@@ -179,6 +179,13 @@ interface ValidationOptions {
179
179
  checkRevocation?: boolean;
180
180
  revocationStore?: RevocationStore;
181
181
  clockSkew?: number;
182
+ /**
183
+ * Permitted JWS algorithms. The token's `alg` header must appear in this
184
+ * list or validation fails. Defaults to `['EdDSA', 'ES256']` (the APOA
185
+ * conformance baseline). Pin to a single value to enforce an org policy
186
+ * (e.g. EdDSA-only).
187
+ */
188
+ algorithms?: ('EdDSA' | 'ES256')[];
182
189
  }
183
190
  /** Result of token validation. */
184
191
  interface ValidationResult {
@@ -330,11 +337,14 @@ declare function parseScope(scope: string): string[];
330
337
  * Check if a scope pattern matches a requested scope.
331
338
  *
332
339
  * Rules:
333
- * 1. Root wildcard "*" matches everything
334
- * 2. Exact match: "appointments:read" matches "appointments:read"
335
- * 3. Wildcard at level: "appointments:*" matches "appointments:read"
340
+ * 1. Empty pattern or empty requested string never matches (a vacuous match
341
+ * on `''` would let a token with `scopes: ['']` authorize an empty
342
+ * action, or vice versa).
343
+ * 2. Root wildcard "*" matches everything (non-empty)
344
+ * 3. Exact match: "appointments:read" matches "appointments:read"
345
+ * 4. Wildcard at level: "appointments:*" matches "appointments:read"
336
346
  * but NOT "appointments:read:summary" (wildcards don't cross levels)
337
- * 4. Segment-by-segment matching with wildcard support at each level
347
+ * 5. Segment-by-segment matching with wildcard support at each level
338
348
  */
339
349
  declare function matchScope(pattern: string, requested: string): boolean;
340
350
 
@@ -396,13 +406,18 @@ declare function authorize(token: APOAToken, service: string, action: string, op
396
406
  declare function parseDefinition(input: string, format?: 'yaml' | 'json'): APOADefinition;
397
407
 
398
408
  /**
399
- * Revoke a token. No cascade logic that's Phase 3.
409
+ * Revoke a token. The caller MUST supply a RevocationStore so the revocation
410
+ * is durable and visible to other parts of the system. There is no default
411
+ * store: a process-shared singleton would silently diverge from the store
412
+ * used by `createClient()` and any caller-supplied store, producing
413
+ * "succeeded but never enforced" revocations.
400
414
  */
401
- declare function revoke(tokenId: string, options: RevocationOptions, store?: RevocationStore): Promise<RevocationRecord>;
415
+ declare function revoke(tokenId: string, options: RevocationOptions, store: RevocationStore): Promise<RevocationRecord>;
402
416
  /**
403
- * Check if a token has been revoked.
417
+ * Check if a token has been revoked. Caller must supply the same
418
+ * RevocationStore that revoke() wrote to.
404
419
  */
405
- declare function isRevoked(tokenId: string, store?: RevocationStore): Promise<boolean>;
420
+ declare function isRevoked(tokenId: string, store: RevocationStore): Promise<boolean>;
406
421
 
407
422
  /**
408
423
  * Log an action against a token.
@@ -423,7 +438,7 @@ declare function getAuditTrailByService(service: string, options?: AuditQueryOpt
423
438
  * Generates a UUID for jti, validates metadata, derives audience,
424
439
  * warns at 4KB, rejects above 8KB.
425
440
  */
426
- declare function createToken(definition: APOADefinition, options: SigningOptions): Promise<APOAToken>;
441
+ declare function createToken(definition: APOADefinition, options: SigningOptions, parentTokenId?: string): Promise<APOAToken>;
427
442
 
428
443
  /**
429
444
  * Sign an APOA token payload as a compact JWS.
@@ -452,15 +467,19 @@ declare function verifySignature(token: string, key: CryptoKey): Promise<Record<
452
467
  declare function validateToken(token: string | APOAToken, options: ValidationOptions): Promise<ValidationResult>;
453
468
 
454
469
  /**
455
- * Cascade revoke: revoke a parent token and all child tokens in a delegation chain.
456
- * Populates RevocationRecord.cascaded with child token IDs.
470
+ * Cascade revoke: revoke a parent token and all child tokens in a delegation
471
+ * chain. Populates RevocationRecord.cascaded with child token IDs.
472
+ *
473
+ * The caller MUST supply a RevocationStore. There is no default store: a
474
+ * process-shared singleton would silently diverge from the store used by
475
+ * `createClient()` and any caller-supplied store.
457
476
  *
458
477
  * @param parentTokenId - The parent token's jti to revoke
459
478
  * @param childTokenIds - Array of child token jti values to cascade-revoke
460
479
  * @param options - Revocation options (revokedBy, reason)
461
- * @param store - Optional revocation store
480
+ * @param store - The revocation store to write to
462
481
  */
463
- declare function cascadeRevoke(parentTokenId: string, childTokenIds: string[], options: RevocationOptions, store?: RevocationStore): Promise<RevocationRecord>;
482
+ declare function cascadeRevoke(parentTokenId: string, childTokenIds: string[], options: RevocationOptions, store: RevocationStore): Promise<RevocationRecord>;
464
483
 
465
484
  /**
466
485
  * Verify that a delegation definition is a valid attenuation of a parent token.
@@ -493,9 +512,83 @@ declare function delegate(parentToken: APOAToken, childDef: DelegationDefinition
493
512
  * - Checks expiration of every token (if any parent expired, chain is invalid)
494
513
  * - If RevocationStore provided, checks revocation of every token
495
514
  * - Reports all errors found, plus failedAt index
515
+ *
516
+ * IMPORTANT: This function checks structural integrity (attenuation, expiry,
517
+ * revocation, parentToken links) but does NOT verify cryptographic signatures.
518
+ * Each token in the chain MUST be validated via validateToken() before passing
519
+ * to verifyChain(). Passing unvalidated APOAToken objects defeats chain security.
496
520
  */
497
521
  declare function verifyChain(chain: DelegationChain, store?: RevocationStore): Promise<ChainVerificationResult>;
498
522
 
523
+ type DefinitionLike = {
524
+ parentToken?: unknown;
525
+ delegationChain?: unknown;
526
+ };
527
+ type TokenLike = {
528
+ parentToken?: unknown;
529
+ definition?: DefinitionLike;
530
+ };
531
+ /**
532
+ * Return ancestor token IDs referenced by a token-like object.
533
+ *
534
+ * Canonical SDK tokens use `parentToken` for the direct parent. Some transport
535
+ * adapters also carry `definition.delegationChain` snapshots or message
536
+ * metadata with ancestor IDs. This helper normalizes those forms so revocation
537
+ * checks can consistently include every known ancestor.
538
+ */
539
+ declare function getDelegationAncestorIds(input: APOAToken | TokenLike | DefinitionLike): string[];
540
+
541
+ /** A JSON Web Key as defined by RFC 7517. */
542
+ interface JWK {
543
+ kty: string;
544
+ crv?: string;
545
+ x?: string;
546
+ y?: string;
547
+ kid: string;
548
+ use?: 'sig' | 'enc';
549
+ alg?: string;
550
+ [key: string]: unknown;
551
+ }
552
+ /** A JSON Web Key Set as defined by RFC 7517 §5. */
553
+ interface JWKS {
554
+ keys: JWK[];
555
+ }
556
+ interface PublicKeyToJWKOptions {
557
+ kid: string;
558
+ use?: 'sig' | 'enc';
559
+ alg?: 'EdDSA' | 'ES256';
560
+ }
561
+ /**
562
+ * Convert a public CryptoKey into a JWK. The `kid` is required so callers
563
+ * can match keys against the `kid` header on signed tokens. `alg` defaults
564
+ * to the algorithm implied by the key type (`EdDSA` for Ed25519, `ES256`
565
+ * for P-256).
566
+ */
567
+ declare function publicKeyToJWK(publicKey: CryptoKey, options: PublicKeyToJWKOptions): Promise<JWK>;
568
+ /** Wrap an array of JWKs in the JWKS envelope. */
569
+ declare function buildJWKS(keys: JWK[]): JWKS;
570
+ interface JWKSResolverOptions {
571
+ /** How long a fetched JWKS is cached in memory before refetch. Default 1 hour. */
572
+ cacheMaxAgeMs?: number;
573
+ /** How long a fetched JWKS is reused if a refetch fails. Default 24 hours. */
574
+ cooldownMs?: number;
575
+ /** Custom fetch implementation; defaults to the global fetch. */
576
+ fetch?: typeof fetch;
577
+ /**
578
+ * Allow non-https:// JWKS URLs. Off by default because APOA mandates TLS
579
+ * for all communication (SPEC §13.2). Use only for local development.
580
+ */
581
+ allowInsecure?: boolean;
582
+ }
583
+ /**
584
+ * Create a KeyResolver backed by a remote JWKS endpoint. The resolver fetches
585
+ * `url`, caches the response, and returns the matching public key for a
586
+ * given `kid` claim. Used in conjunction with `validateToken`'s `keyResolver`
587
+ * option so a relying party can verify tokens signed by keys it discovers
588
+ * at runtime.
589
+ */
590
+ declare function createJWKSResolver(url: string, options?: JWKSResolverOptions): KeyResolver;
591
+
499
592
  /**
500
593
  * Create a configured APOA client.
501
594
  * Wires up RevocationStore and AuditStore so methods don't need explicit store params.
@@ -503,4 +596,4 @@ declare function verifyChain(chain: DelegationChain, store?: RevocationStore): P
503
596
  */
504
597
  declare function createClient(options?: APOAClientOptions): APOAClient;
505
598
 
506
- export { type APIAccessConfig, type APOAClient, type APOAClientOptions, type APOADefinition, APOAError, type APOAToken, type AccessMode, type Agent, type AgentProvider, AttenuationViolationError, type AuditDetailValue, type AuditEntry, type AuditQueryOptions, type AuditStore, type AuthorizationResult, type AuthorizeOptions, type BrowserSessionConfig, ChainVerificationError, type ChainVerificationResult, type ConstraintMap, type ConstraintValue, DefinitionValidationError, type DelegationChain, type DelegationDefinition, type KeyResolver, type LegalFramework, MemoryAuditStore, MemoryRevocationStore, MetadataValidationError, type MetadataValue, type OnRuleViolation, type Principal, RevocationError, type RevocationOptions, type RevocationRecord, type RevocationStore, type Rule, RuleEnforcementError, type RuleViolation, type ScopeCheckResult, ScopeViolationError, type ServiceAuthorization, type SigningOptions, TokenExpiredError, type TokenMetadata, type ValidationOptions, type ValidationResult, authorize, cascadeRevoke, checkConstraint, checkScope, createClient, createToken, decodeHeader, delegate, generateKeyPair, getAuditTrail, getAuditTrailByService, isBeforeNotBefore, isExpired, isRevoked, logAction, matchScope, parseDefinition, parseScope, revoke, sign, signToken, validateToken, verify, verifyAttenuation, verifyChain, verifySignature };
599
+ export { type APIAccessConfig, type APOAClient, type APOAClientOptions, type APOADefinition, APOAError, type APOAToken, type AccessMode, type Agent, type AgentProvider, AttenuationViolationError, type AuditDetailValue, type AuditEntry, type AuditQueryOptions, type AuditStore, type AuthorizationResult, type AuthorizeOptions, type BrowserSessionConfig, ChainVerificationError, type ChainVerificationResult, type ConstraintMap, type ConstraintValue, DefinitionValidationError, type DelegationChain, type DelegationDefinition, type JWK, type JWKS, type JWKSResolverOptions, type KeyResolver, type LegalFramework, MemoryAuditStore, MemoryRevocationStore, MetadataValidationError, type MetadataValue, type OnRuleViolation, type Principal, type PublicKeyToJWKOptions, RevocationError, type RevocationOptions, type RevocationRecord, type RevocationStore, type Rule, RuleEnforcementError, type RuleViolation, type ScopeCheckResult, ScopeViolationError, type ServiceAuthorization, type SigningOptions, TokenExpiredError, type TokenMetadata, type ValidationOptions, type ValidationResult, authorize, buildJWKS, cascadeRevoke, checkConstraint, checkScope, createClient, createJWKSResolver, createToken, decodeHeader, delegate, generateKeyPair, getAuditTrail, getAuditTrailByService, getDelegationAncestorIds, isBeforeNotBefore, isExpired, isRevoked, logAction, matchScope, parseDefinition, parseScope, publicKeyToJWK, revoke, sign, signToken, validateToken, verify, verifyAttenuation, verifyChain, verifySignature };
package/dist/index.d.ts CHANGED
@@ -179,6 +179,13 @@ interface ValidationOptions {
179
179
  checkRevocation?: boolean;
180
180
  revocationStore?: RevocationStore;
181
181
  clockSkew?: number;
182
+ /**
183
+ * Permitted JWS algorithms. The token's `alg` header must appear in this
184
+ * list or validation fails. Defaults to `['EdDSA', 'ES256']` (the APOA
185
+ * conformance baseline). Pin to a single value to enforce an org policy
186
+ * (e.g. EdDSA-only).
187
+ */
188
+ algorithms?: ('EdDSA' | 'ES256')[];
182
189
  }
183
190
  /** Result of token validation. */
184
191
  interface ValidationResult {
@@ -330,11 +337,14 @@ declare function parseScope(scope: string): string[];
330
337
  * Check if a scope pattern matches a requested scope.
331
338
  *
332
339
  * Rules:
333
- * 1. Root wildcard "*" matches everything
334
- * 2. Exact match: "appointments:read" matches "appointments:read"
335
- * 3. Wildcard at level: "appointments:*" matches "appointments:read"
340
+ * 1. Empty pattern or empty requested string never matches (a vacuous match
341
+ * on `''` would let a token with `scopes: ['']` authorize an empty
342
+ * action, or vice versa).
343
+ * 2. Root wildcard "*" matches everything (non-empty)
344
+ * 3. Exact match: "appointments:read" matches "appointments:read"
345
+ * 4. Wildcard at level: "appointments:*" matches "appointments:read"
336
346
  * but NOT "appointments:read:summary" (wildcards don't cross levels)
337
- * 4. Segment-by-segment matching with wildcard support at each level
347
+ * 5. Segment-by-segment matching with wildcard support at each level
338
348
  */
339
349
  declare function matchScope(pattern: string, requested: string): boolean;
340
350
 
@@ -396,13 +406,18 @@ declare function authorize(token: APOAToken, service: string, action: string, op
396
406
  declare function parseDefinition(input: string, format?: 'yaml' | 'json'): APOADefinition;
397
407
 
398
408
  /**
399
- * Revoke a token. No cascade logic that's Phase 3.
409
+ * Revoke a token. The caller MUST supply a RevocationStore so the revocation
410
+ * is durable and visible to other parts of the system. There is no default
411
+ * store: a process-shared singleton would silently diverge from the store
412
+ * used by `createClient()` and any caller-supplied store, producing
413
+ * "succeeded but never enforced" revocations.
400
414
  */
401
- declare function revoke(tokenId: string, options: RevocationOptions, store?: RevocationStore): Promise<RevocationRecord>;
415
+ declare function revoke(tokenId: string, options: RevocationOptions, store: RevocationStore): Promise<RevocationRecord>;
402
416
  /**
403
- * Check if a token has been revoked.
417
+ * Check if a token has been revoked. Caller must supply the same
418
+ * RevocationStore that revoke() wrote to.
404
419
  */
405
- declare function isRevoked(tokenId: string, store?: RevocationStore): Promise<boolean>;
420
+ declare function isRevoked(tokenId: string, store: RevocationStore): Promise<boolean>;
406
421
 
407
422
  /**
408
423
  * Log an action against a token.
@@ -423,7 +438,7 @@ declare function getAuditTrailByService(service: string, options?: AuditQueryOpt
423
438
  * Generates a UUID for jti, validates metadata, derives audience,
424
439
  * warns at 4KB, rejects above 8KB.
425
440
  */
426
- declare function createToken(definition: APOADefinition, options: SigningOptions): Promise<APOAToken>;
441
+ declare function createToken(definition: APOADefinition, options: SigningOptions, parentTokenId?: string): Promise<APOAToken>;
427
442
 
428
443
  /**
429
444
  * Sign an APOA token payload as a compact JWS.
@@ -452,15 +467,19 @@ declare function verifySignature(token: string, key: CryptoKey): Promise<Record<
452
467
  declare function validateToken(token: string | APOAToken, options: ValidationOptions): Promise<ValidationResult>;
453
468
 
454
469
  /**
455
- * Cascade revoke: revoke a parent token and all child tokens in a delegation chain.
456
- * Populates RevocationRecord.cascaded with child token IDs.
470
+ * Cascade revoke: revoke a parent token and all child tokens in a delegation
471
+ * chain. Populates RevocationRecord.cascaded with child token IDs.
472
+ *
473
+ * The caller MUST supply a RevocationStore. There is no default store: a
474
+ * process-shared singleton would silently diverge from the store used by
475
+ * `createClient()` and any caller-supplied store.
457
476
  *
458
477
  * @param parentTokenId - The parent token's jti to revoke
459
478
  * @param childTokenIds - Array of child token jti values to cascade-revoke
460
479
  * @param options - Revocation options (revokedBy, reason)
461
- * @param store - Optional revocation store
480
+ * @param store - The revocation store to write to
462
481
  */
463
- declare function cascadeRevoke(parentTokenId: string, childTokenIds: string[], options: RevocationOptions, store?: RevocationStore): Promise<RevocationRecord>;
482
+ declare function cascadeRevoke(parentTokenId: string, childTokenIds: string[], options: RevocationOptions, store: RevocationStore): Promise<RevocationRecord>;
464
483
 
465
484
  /**
466
485
  * Verify that a delegation definition is a valid attenuation of a parent token.
@@ -493,9 +512,83 @@ declare function delegate(parentToken: APOAToken, childDef: DelegationDefinition
493
512
  * - Checks expiration of every token (if any parent expired, chain is invalid)
494
513
  * - If RevocationStore provided, checks revocation of every token
495
514
  * - Reports all errors found, plus failedAt index
515
+ *
516
+ * IMPORTANT: This function checks structural integrity (attenuation, expiry,
517
+ * revocation, parentToken links) but does NOT verify cryptographic signatures.
518
+ * Each token in the chain MUST be validated via validateToken() before passing
519
+ * to verifyChain(). Passing unvalidated APOAToken objects defeats chain security.
496
520
  */
497
521
  declare function verifyChain(chain: DelegationChain, store?: RevocationStore): Promise<ChainVerificationResult>;
498
522
 
523
+ type DefinitionLike = {
524
+ parentToken?: unknown;
525
+ delegationChain?: unknown;
526
+ };
527
+ type TokenLike = {
528
+ parentToken?: unknown;
529
+ definition?: DefinitionLike;
530
+ };
531
+ /**
532
+ * Return ancestor token IDs referenced by a token-like object.
533
+ *
534
+ * Canonical SDK tokens use `parentToken` for the direct parent. Some transport
535
+ * adapters also carry `definition.delegationChain` snapshots or message
536
+ * metadata with ancestor IDs. This helper normalizes those forms so revocation
537
+ * checks can consistently include every known ancestor.
538
+ */
539
+ declare function getDelegationAncestorIds(input: APOAToken | TokenLike | DefinitionLike): string[];
540
+
541
+ /** A JSON Web Key as defined by RFC 7517. */
542
+ interface JWK {
543
+ kty: string;
544
+ crv?: string;
545
+ x?: string;
546
+ y?: string;
547
+ kid: string;
548
+ use?: 'sig' | 'enc';
549
+ alg?: string;
550
+ [key: string]: unknown;
551
+ }
552
+ /** A JSON Web Key Set as defined by RFC 7517 §5. */
553
+ interface JWKS {
554
+ keys: JWK[];
555
+ }
556
+ interface PublicKeyToJWKOptions {
557
+ kid: string;
558
+ use?: 'sig' | 'enc';
559
+ alg?: 'EdDSA' | 'ES256';
560
+ }
561
+ /**
562
+ * Convert a public CryptoKey into a JWK. The `kid` is required so callers
563
+ * can match keys against the `kid` header on signed tokens. `alg` defaults
564
+ * to the algorithm implied by the key type (`EdDSA` for Ed25519, `ES256`
565
+ * for P-256).
566
+ */
567
+ declare function publicKeyToJWK(publicKey: CryptoKey, options: PublicKeyToJWKOptions): Promise<JWK>;
568
+ /** Wrap an array of JWKs in the JWKS envelope. */
569
+ declare function buildJWKS(keys: JWK[]): JWKS;
570
+ interface JWKSResolverOptions {
571
+ /** How long a fetched JWKS is cached in memory before refetch. Default 1 hour. */
572
+ cacheMaxAgeMs?: number;
573
+ /** How long a fetched JWKS is reused if a refetch fails. Default 24 hours. */
574
+ cooldownMs?: number;
575
+ /** Custom fetch implementation; defaults to the global fetch. */
576
+ fetch?: typeof fetch;
577
+ /**
578
+ * Allow non-https:// JWKS URLs. Off by default because APOA mandates TLS
579
+ * for all communication (SPEC §13.2). Use only for local development.
580
+ */
581
+ allowInsecure?: boolean;
582
+ }
583
+ /**
584
+ * Create a KeyResolver backed by a remote JWKS endpoint. The resolver fetches
585
+ * `url`, caches the response, and returns the matching public key for a
586
+ * given `kid` claim. Used in conjunction with `validateToken`'s `keyResolver`
587
+ * option so a relying party can verify tokens signed by keys it discovers
588
+ * at runtime.
589
+ */
590
+ declare function createJWKSResolver(url: string, options?: JWKSResolverOptions): KeyResolver;
591
+
499
592
  /**
500
593
  * Create a configured APOA client.
501
594
  * Wires up RevocationStore and AuditStore so methods don't need explicit store params.
@@ -503,4 +596,4 @@ declare function verifyChain(chain: DelegationChain, store?: RevocationStore): P
503
596
  */
504
597
  declare function createClient(options?: APOAClientOptions): APOAClient;
505
598
 
506
- export { type APIAccessConfig, type APOAClient, type APOAClientOptions, type APOADefinition, APOAError, type APOAToken, type AccessMode, type Agent, type AgentProvider, AttenuationViolationError, type AuditDetailValue, type AuditEntry, type AuditQueryOptions, type AuditStore, type AuthorizationResult, type AuthorizeOptions, type BrowserSessionConfig, ChainVerificationError, type ChainVerificationResult, type ConstraintMap, type ConstraintValue, DefinitionValidationError, type DelegationChain, type DelegationDefinition, type KeyResolver, type LegalFramework, MemoryAuditStore, MemoryRevocationStore, MetadataValidationError, type MetadataValue, type OnRuleViolation, type Principal, RevocationError, type RevocationOptions, type RevocationRecord, type RevocationStore, type Rule, RuleEnforcementError, type RuleViolation, type ScopeCheckResult, ScopeViolationError, type ServiceAuthorization, type SigningOptions, TokenExpiredError, type TokenMetadata, type ValidationOptions, type ValidationResult, authorize, cascadeRevoke, checkConstraint, checkScope, createClient, createToken, decodeHeader, delegate, generateKeyPair, getAuditTrail, getAuditTrailByService, isBeforeNotBefore, isExpired, isRevoked, logAction, matchScope, parseDefinition, parseScope, revoke, sign, signToken, validateToken, verify, verifyAttenuation, verifyChain, verifySignature };
599
+ export { type APIAccessConfig, type APOAClient, type APOAClientOptions, type APOADefinition, APOAError, type APOAToken, type AccessMode, type Agent, type AgentProvider, AttenuationViolationError, type AuditDetailValue, type AuditEntry, type AuditQueryOptions, type AuditStore, type AuthorizationResult, type AuthorizeOptions, type BrowserSessionConfig, ChainVerificationError, type ChainVerificationResult, type ConstraintMap, type ConstraintValue, DefinitionValidationError, type DelegationChain, type DelegationDefinition, type JWK, type JWKS, type JWKSResolverOptions, type KeyResolver, type LegalFramework, MemoryAuditStore, MemoryRevocationStore, MetadataValidationError, type MetadataValue, type OnRuleViolation, type Principal, type PublicKeyToJWKOptions, RevocationError, type RevocationOptions, type RevocationRecord, type RevocationStore, type Rule, RuleEnforcementError, type RuleViolation, type ScopeCheckResult, ScopeViolationError, type ServiceAuthorization, type SigningOptions, TokenExpiredError, type TokenMetadata, type ValidationOptions, type ValidationResult, authorize, buildJWKS, cascadeRevoke, checkConstraint, checkScope, createClient, createJWKSResolver, createToken, decodeHeader, delegate, generateKeyPair, getAuditTrail, getAuditTrailByService, getDelegationAncestorIds, isBeforeNotBefore, isExpired, isRevoked, logAction, matchScope, parseDefinition, parseScope, publicKeyToJWK, revoke, sign, signToken, validateToken, verify, verifyAttenuation, verifyChain, verifySignature };