@mcp-abap-adt/interfaces-adt 8.0.0 → 9.0.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/README.md +61 -13
  3. package/dist/connection/ITimeoutConfig.d.ts +15 -0
  4. package/dist/connection/ITimeoutConfig.d.ts.map +1 -0
  5. package/dist/index.d.ts +10 -35
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +10 -23
  8. package/package.json +3 -5
  9. package/dist/Headers.d.ts +0 -38
  10. package/dist/Headers.d.ts.map +0 -1
  11. package/dist/Headers.js +0 -43
  12. package/dist/adt/AdtTypes.d.ts +0 -40
  13. package/dist/adt/AdtTypes.d.ts.map +0 -1
  14. package/dist/adt/AdtTypes.js +0 -5
  15. package/dist/auth/AssertionErrorCodes.d.ts +0 -15
  16. package/dist/auth/AssertionErrorCodes.d.ts.map +0 -1
  17. package/dist/auth/AssertionErrorCodes.js +0 -16
  18. package/dist/auth/AuthType.d.ts +0 -5
  19. package/dist/auth/AuthType.d.ts.map +0 -1
  20. package/dist/auth/IAssertionValidator.d.ts +0 -100
  21. package/dist/auth/IAssertionValidator.d.ts.map +0 -1
  22. package/dist/auth/IAssertionValidator.js +0 -10
  23. package/dist/auth/IAuthorizationConfig.d.ts +0 -15
  24. package/dist/auth/IAuthorizationConfig.d.ts.map +0 -1
  25. package/dist/auth/IAuthorizationConfig.js +0 -2
  26. package/dist/auth/IAuthorizationStrategy.d.ts +0 -59
  27. package/dist/auth/IAuthorizationStrategy.d.ts.map +0 -1
  28. package/dist/auth/IAuthorizationStrategy.js +0 -12
  29. package/dist/auth/ICallbackServer.d.ts +0 -139
  30. package/dist/auth/ICallbackServer.d.ts.map +0 -1
  31. package/dist/auth/ICallbackServer.js +0 -2
  32. package/dist/auth/ICertificateMaterialLoader.d.ts +0 -7
  33. package/dist/auth/ICertificateMaterialLoader.d.ts.map +0 -1
  34. package/dist/auth/ICertificateMaterialLoader.js +0 -2
  35. package/dist/auth/IConfig.d.ts +0 -8
  36. package/dist/auth/IConfig.d.ts.map +0 -1
  37. package/dist/auth/IConfig.js +0 -2
  38. package/dist/auth/IConnectionConfig.d.ts +0 -23
  39. package/dist/auth/IConnectionConfig.d.ts.map +0 -1
  40. package/dist/auth/IConnectionConfig.js +0 -2
  41. package/dist/sap/ISapConfig.d.ts +0 -22
  42. package/dist/sap/ISapConfig.d.ts.map +0 -1
  43. package/dist/sap/ISapConfig.js +0 -2
  44. package/dist/sap/SapAuthType.d.ts +0 -3
  45. package/dist/sap/SapAuthType.d.ts.map +0 -1
  46. package/dist/sap/SapAuthType.js +0 -2
  47. package/dist/serviceKey/IServiceKeyStore.d.ts +0 -31
  48. package/dist/serviceKey/IServiceKeyStore.d.ts.map +0 -1
  49. package/dist/serviceKey/IServiceKeyStore.js +0 -7
  50. package/dist/session/ISessionStore.d.ts +0 -59
  51. package/dist/session/ISessionStore.d.ts.map +0 -1
  52. package/dist/session/ISessionStore.js +0 -7
  53. package/dist/store/ISessionState.d.ts +0 -11
  54. package/dist/store/ISessionState.d.ts.map +0 -1
  55. package/dist/store/ISessionState.js +0 -2
  56. package/dist/store/ISessionStorage.d.ts +0 -26
  57. package/dist/store/ISessionStorage.d.ts.map +0 -1
  58. package/dist/store/ISessionStorage.js +0 -2
  59. package/dist/store/StoreErrorCodes.d.ts +0 -12
  60. package/dist/store/StoreErrorCodes.d.ts.map +0 -1
  61. package/dist/store/StoreErrorCodes.js +0 -13
  62. package/dist/token/AuthType.d.ts +0 -43
  63. package/dist/token/AuthType.d.ts.map +0 -1
  64. package/dist/token/AuthType.js +0 -41
  65. package/dist/token/ITokenProvider.d.ts +0 -27
  66. package/dist/token/ITokenProvider.d.ts.map +0 -1
  67. package/dist/token/ITokenProvider.js +0 -8
  68. package/dist/token/ITokenProviderOptions.d.ts +0 -23
  69. package/dist/token/ITokenProviderOptions.d.ts.map +0 -1
  70. package/dist/token/ITokenProviderOptions.js +0 -2
  71. package/dist/token/ITokenProviderResult.d.ts +0 -12
  72. package/dist/token/ITokenProviderResult.d.ts.map +0 -1
  73. package/dist/token/ITokenProviderResult.js +0 -2
  74. package/dist/token/ITokenRefresher.d.ts +0 -39
  75. package/dist/token/ITokenRefresher.d.ts.map +0 -1
  76. package/dist/token/ITokenRefresher.js +0 -12
  77. package/dist/token/ITokenResult.d.ts +0 -36
  78. package/dist/token/ITokenResult.d.ts.map +0 -1
  79. package/dist/token/ITokenResult.js +0 -7
  80. package/dist/token/TokenProviderErrorCodes.d.ts +0 -26
  81. package/dist/token/TokenProviderErrorCodes.d.ts.map +0 -1
  82. package/dist/token/TokenProviderErrorCodes.js +0 -24
  83. package/dist/utils/ITokenRefreshResult.d.ts +0 -8
  84. package/dist/utils/ITokenRefreshResult.d.ts.map +0 -1
  85. package/dist/utils/ITokenRefreshResult.js +0 -2
  86. package/dist/validation/IHeaderValidationResult.d.ts +0 -15
  87. package/dist/validation/IHeaderValidationResult.d.ts.map +0 -1
  88. package/dist/validation/IHeaderValidationResult.js +0 -2
  89. package/dist/validation/IValidatedAuthConfig.d.ts +0 -46
  90. package/dist/validation/IValidatedAuthConfig.d.ts.map +0 -1
  91. package/dist/validation/IValidatedAuthConfig.js +0 -15
  92. /package/dist/{auth/AuthType.js → connection/ITimeoutConfig.js} +0 -0
@@ -1,26 +0,0 @@
1
- /**
2
- * Interface for storing and retrieving session state
3
- * Allows connection layer to persist session state (cookies, CSRF token) externally
4
- */
5
- import type { ISessionState } from './ISessionState';
6
- /** Nothing imports this yet; it sits with the session and token contracts it belongs to. */
7
- export interface ISessionStorage {
8
- /**
9
- * Save session state for a given session ID
10
- * @param sessionId - Unique session identifier
11
- * @param state - Session state to save
12
- */
13
- save(sessionId: string, state: ISessionState): Promise<void>;
14
- /**
15
- * Load session state for a given session ID
16
- * @param sessionId - Unique session identifier
17
- * @returns Session state or null if not found
18
- */
19
- load(sessionId: string): Promise<ISessionState | null>;
20
- /**
21
- * Delete session state for a given session ID
22
- * @param sessionId - Unique session identifier
23
- */
24
- delete(sessionId: string): Promise<void>;
25
- }
26
- //# sourceMappingURL=ISessionStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISessionStorage.d.ts","sourceRoot":"","sources":["../../src/store/ISessionStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,4FAA4F;AAC5F,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7D;;;;OAIG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAEvD;;;OAGG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +0,0 @@
1
- /**
2
- * Error codes for store operations
3
- * Used by auth-stores package to provide typed errors to auth-broker
4
- */
5
- export declare const STORE_ERROR_CODES: {
6
- readonly FILE_NOT_FOUND: "FILE_NOT_FOUND";
7
- readonly PARSE_ERROR: "PARSE_ERROR";
8
- readonly INVALID_CONFIG: "INVALID_CONFIG";
9
- readonly STORAGE_ERROR: "STORAGE_ERROR";
10
- };
11
- export type StoreErrorCode = (typeof STORE_ERROR_CODES)[keyof typeof STORE_ERROR_CODES];
12
- //# sourceMappingURL=StoreErrorCodes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StoreErrorCodes.d.ts","sourceRoot":"","sources":["../../src/store/StoreErrorCodes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- /**
3
- * Error codes for store operations
4
- * Used by auth-stores package to provide typed errors to auth-broker
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.STORE_ERROR_CODES = void 0;
8
- exports.STORE_ERROR_CODES = {
9
- FILE_NOT_FOUND: 'FILE_NOT_FOUND',
10
- PARSE_ERROR: 'PARSE_ERROR',
11
- INVALID_CONFIG: 'INVALID_CONFIG',
12
- STORAGE_ERROR: 'STORAGE_ERROR',
13
- };
@@ -1,43 +0,0 @@
1
- /**
2
- * OAuth2 Grant Types
3
- *
4
- * Constants for different OAuth2 authentication flows (grant types)
5
- */
6
- /**
7
- * Authorization Code grant type
8
- * Standard OAuth2 flow with browser-based authorization
9
- */
10
- export declare const AUTH_TYPE_AUTHORIZATION_CODE: "authorization_code";
11
- /**
12
- * Authorization Code with PKCE grant type
13
- * More secure variant for public clients
14
- */
15
- export declare const AUTH_TYPE_AUTHORIZATION_CODE_PKCE: "authorization_code_pkce";
16
- /**
17
- * Password Credentials grant type
18
- * Direct username/password authentication
19
- */
20
- export declare const AUTH_TYPE_PASSWORD: "password";
21
- /**
22
- * Client Credentials grant type
23
- * Service-to-service authentication
24
- */
25
- export declare const AUTH_TYPE_CLIENT_CREDENTIALS: "client_credentials";
26
- /**
27
- * User token passthrough (external token)
28
- */
29
- export declare const AUTH_TYPE_USER_TOKEN: "user_token";
30
- /**
31
- * Client X509 (mTLS) authentication
32
- */
33
- export declare const AUTH_TYPE_CLIENT_X509: "client_x509";
34
- /**
35
- * SAML 2.0 Bearer Assertion grant type
36
- * Used to exchange SAML assertions for OAuth2 access tokens
37
- */
38
- export declare const AUTH_TYPE_SAML2_BEARER: "saml2_bearer";
39
- /**
40
- * Union type for all OAuth2 grant types
41
- */
42
- export type OAuth2GrantType = typeof AUTH_TYPE_AUTHORIZATION_CODE | typeof AUTH_TYPE_AUTHORIZATION_CODE_PKCE | typeof AUTH_TYPE_PASSWORD | typeof AUTH_TYPE_CLIENT_CREDENTIALS | typeof AUTH_TYPE_USER_TOKEN | typeof AUTH_TYPE_CLIENT_X509 | typeof AUTH_TYPE_SAML2_BEARER;
43
- //# sourceMappingURL=AuthType.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthType.d.ts","sourceRoot":"","sources":["../../src/token/AuthType.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAG,oBAA6B,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,iCAAiC,EAC5C,yBAAkC,CAAC;AAErC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAG,UAAmB,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAG,oBAA6B,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAG,YAAqB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAG,aAAsB,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAG,cAAuB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,OAAO,4BAA4B,GACnC,OAAO,iCAAiC,GACxC,OAAO,kBAAkB,GACzB,OAAO,4BAA4B,GACnC,OAAO,oBAAoB,GAC3B,OAAO,qBAAqB,GAC5B,OAAO,sBAAsB,CAAC"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- /**
3
- * OAuth2 Grant Types
4
- *
5
- * Constants for different OAuth2 authentication flows (grant types)
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.AUTH_TYPE_SAML2_BEARER = exports.AUTH_TYPE_CLIENT_X509 = exports.AUTH_TYPE_USER_TOKEN = exports.AUTH_TYPE_CLIENT_CREDENTIALS = exports.AUTH_TYPE_PASSWORD = exports.AUTH_TYPE_AUTHORIZATION_CODE_PKCE = exports.AUTH_TYPE_AUTHORIZATION_CODE = void 0;
9
- /**
10
- * Authorization Code grant type
11
- * Standard OAuth2 flow with browser-based authorization
12
- */
13
- exports.AUTH_TYPE_AUTHORIZATION_CODE = 'authorization_code';
14
- /**
15
- * Authorization Code with PKCE grant type
16
- * More secure variant for public clients
17
- */
18
- exports.AUTH_TYPE_AUTHORIZATION_CODE_PKCE = 'authorization_code_pkce';
19
- /**
20
- * Password Credentials grant type
21
- * Direct username/password authentication
22
- */
23
- exports.AUTH_TYPE_PASSWORD = 'password';
24
- /**
25
- * Client Credentials grant type
26
- * Service-to-service authentication
27
- */
28
- exports.AUTH_TYPE_CLIENT_CREDENTIALS = 'client_credentials';
29
- /**
30
- * User token passthrough (external token)
31
- */
32
- exports.AUTH_TYPE_USER_TOKEN = 'user_token';
33
- /**
34
- * Client X509 (mTLS) authentication
35
- */
36
- exports.AUTH_TYPE_CLIENT_X509 = 'client_x509';
37
- /**
38
- * SAML 2.0 Bearer Assertion grant type
39
- * Used to exchange SAML assertions for OAuth2 access tokens
40
- */
41
- exports.AUTH_TYPE_SAML2_BEARER = 'saml2_bearer';
@@ -1,27 +0,0 @@
1
- /**
2
- * Token Provider interface
3
- *
4
- * Stateful providers that manage token lifecycle internally.
5
- * The provider validates, refreshes, or re-authenticates as needed.
6
- */
7
- import type { ITokenResult } from './ITokenResult';
8
- /**
9
- * Interface for token providers (stateful)
10
- */
11
- export interface ITokenProvider {
12
- /**
13
- * Get tokens with automatic refresh/relogin logic
14
- *
15
- * Stateful providers cache tokens internally and handle refresh automatically.
16
- * Checks token expiration, refreshes if needed, or triggers login.
17
- */
18
- getTokens(): Promise<ITokenResult>;
19
- /**
20
- * Validate JWT token locally (optional)
21
- * @param token JWT token to validate
22
- * @param serviceUrl Service URL (optional, for services that require URL validation)
23
- * @returns Promise that resolves to true if token is valid, false otherwise
24
- */
25
- validateToken?(token: string, serviceUrl?: string): Promise<boolean>;
26
- }
27
- //# sourceMappingURL=ITokenProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITokenProvider.d.ts","sourceRoot":"","sources":["../../src/token/ITokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAEnC;;;;;OAKG;IACH,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtE"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /**
3
- * Token Provider interface
4
- *
5
- * Stateful providers that manage token lifecycle internally.
6
- * The provider validates, refreshes, or re-authenticates as needed.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,23 +0,0 @@
1
- /**
2
- * Options for token providers
3
- *
4
- * Used by ITokenProvider implementations to configure token acquisition behavior.
5
- * All options are optional, allowing providers to use sensible defaults.
6
- */
7
- import type { ILogger } from '@mcp-abap-adt/interfaces-utils';
8
- export interface ITokenProviderOptions {
9
- /**
10
- * Browser type for browser-based authentication
11
- * Supported values: "chrome", "edge", "firefox", "system" (default), "none", "headless"
12
- * - "system": Uses system default browser (default)
13
- * - "headless": Does not open browser, logs URL and waits for manual callback (for SSH/remote sessions)
14
- * - "none": Does not open browser, immediately rejects with error (for automated tests)
15
- */
16
- browser?: string;
17
- /**
18
- * Logger instance for logging token provider operations
19
- * Uses ILogger interface to allow any logger implementation
20
- */
21
- logger?: ILogger;
22
- }
23
- //# sourceMappingURL=ITokenProviderOptions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITokenProviderOptions.d.ts","sourceRoot":"","sources":["../../src/token/ITokenProviderOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +0,0 @@
1
- /**
2
- * Result from token provider
3
- */
4
- import type { IConnectionConfig } from '../auth/IConnectionConfig';
5
- /** Nothing imports this yet; it sits with the session and token contracts it belongs to. */
6
- export interface ITokenProviderResult {
7
- /** Connection configuration with authorization token */
8
- connectionConfig: IConnectionConfig;
9
- /** Refresh token (optional, for BTP/ABAP) */
10
- refreshToken?: string;
11
- }
12
- //# sourceMappingURL=ITokenProviderResult.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITokenProviderResult.d.ts","sourceRoot":"","sources":["../../src/token/ITokenProviderResult.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,4FAA4F;AAC5F,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,39 +0,0 @@
1
- /**
2
- * Token Refresher interface
3
- *
4
- * Provides token management with automatic refresh capability.
5
- * Implementations are created by AuthBroker and injected into connections.
6
- *
7
- * This enables dependency injection of token refresh logic into connections,
8
- * allowing connections to focus on making requests while the refresher
9
- * handles all auth/token lifecycle concerns.
10
- */
11
- /**
12
- * Interface for token refresher
13
- *
14
- * Created by AuthBroker for a specific destination.
15
- * Injected into JwtAbapConnection to enable automatic token refresh.
16
- */
17
- export interface ITokenRefresher {
18
- /**
19
- * Get current valid token.
20
- *
21
- * May return cached token if still valid, or refresh if expired.
22
- * Implementation decides when to refresh based on token expiration.
23
- *
24
- * @returns Promise that resolves to valid JWT token
25
- */
26
- getToken(): Promise<string>;
27
- /**
28
- * Force refresh token.
29
- *
30
- * Always obtains new token from provider, regardless of current token validity.
31
- * Saves new token to session store (cache).
32
- *
33
- * Use this when getToken() returned a token that was rejected by server (401/403).
34
- *
35
- * @returns Promise that resolves to new JWT token
36
- */
37
- refreshToken(): Promise<string>;
38
- }
39
- //# sourceMappingURL=ITokenRefresher.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITokenRefresher.d.ts","sourceRoot":"","sources":["../../src/token/ITokenRefresher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;OAOG;IACH,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE5B;;;;;;;;;OASG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACjC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- /**
3
- * Token Refresher interface
4
- *
5
- * Provides token management with automatic refresh capability.
6
- * Implementations are created by AuthBroker and injected into connections.
7
- *
8
- * This enables dependency injection of token refresh logic into connections,
9
- * allowing connections to focus on making requests while the refresher
10
- * handles all auth/token lifecycle concerns.
11
- */
12
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,36 +0,0 @@
1
- /**
2
- * Token result interface
3
- *
4
- * Result returned by ITokenProvider.getTokens() method
5
- */
6
- import type { OAuth2GrantType } from './AuthType';
7
- export interface ITokenResult {
8
- /**
9
- * Authorization token (access token)
10
- */
11
- authorizationToken: string;
12
- /**
13
- * Refresh token (optional, not all grant types provide it)
14
- */
15
- refreshToken?: string;
16
- /**
17
- * Authentication type (OAuth2 grant type used)
18
- */
19
- authType: OAuth2GrantType;
20
- /**
21
- * Token expiration time in seconds
22
- * If not provided, token expiration is determined from JWT exp claim
23
- */
24
- expiresIn?: number;
25
- /**
26
- * Token expiration time as absolute timestamp (milliseconds since epoch)
27
- * Useful for non-JWT tokens (e.g. SAML assertions).
28
- */
29
- expiresAt?: number;
30
- /**
31
- * Token format/type (helps consumers decide how to validate or parse).
32
- * If omitted, defaults to JWT assumptions.
33
- */
34
- tokenType?: 'jwt' | 'saml' | 'opaque';
35
- }
36
- //# sourceMappingURL=ITokenResult.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITokenResult.d.ts","sourceRoot":"","sources":["../../src/token/ITokenResult.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC;IAE1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;CACvC"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /**
3
- * Token result interface
4
- *
5
- * Result returned by ITokenProvider.getTokens() method
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,26 +0,0 @@
1
- /**
2
- * Token Provider Error Codes
3
- *
4
- * Constants for error codes that token providers can throw.
5
- * Used to enable better error handling and categorization.
6
- */
7
- /**
8
- * Error codes for token provider operations
9
- */
10
- export declare const TOKEN_PROVIDER_ERROR_CODES: {
11
- /** Authentication configuration validation failed */
12
- readonly VALIDATION_ERROR: "VALIDATION_ERROR";
13
- /** Token refresh operation failed */
14
- readonly REFRESH_ERROR: "REFRESH_ERROR";
15
- /** Session data is invalid or incomplete */
16
- readonly SESSION_DATA_ERROR: "SESSION_DATA_ERROR";
17
- /** Service key data is invalid or incomplete */
18
- readonly SERVICE_KEY_ERROR: "SERVICE_KEY_ERROR";
19
- /** Browser authentication failed or was cancelled */
20
- readonly BROWSER_AUTH_ERROR: "BROWSER_AUTH_ERROR";
21
- };
22
- /**
23
- * Type for token provider error codes
24
- */
25
- export type TokenProviderErrorCode = (typeof TOKEN_PROVIDER_ERROR_CODES)[keyof typeof TOKEN_PROVIDER_ERROR_CODES];
26
- //# sourceMappingURL=TokenProviderErrorCodes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenProviderErrorCodes.d.ts","sourceRoot":"","sources":["../../src/token/TokenProviderErrorCodes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B;IACrC,qDAAqD;;IAErD,qCAAqC;;IAErC,4CAA4C;;IAE5C,gDAAgD;;IAEhD,qDAAqD;;CAE7C,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,OAAO,0BAA0B,CAAC,CAAC"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- /**
3
- * Token Provider Error Codes
4
- *
5
- * Constants for error codes that token providers can throw.
6
- * Used to enable better error handling and categorization.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.TOKEN_PROVIDER_ERROR_CODES = void 0;
10
- /**
11
- * Error codes for token provider operations
12
- */
13
- exports.TOKEN_PROVIDER_ERROR_CODES = {
14
- /** Authentication configuration validation failed */
15
- VALIDATION_ERROR: 'VALIDATION_ERROR',
16
- /** Token refresh operation failed */
17
- REFRESH_ERROR: 'REFRESH_ERROR',
18
- /** Session data is invalid or incomplete */
19
- SESSION_DATA_ERROR: 'SESSION_DATA_ERROR',
20
- /** Service key data is invalid or incomplete */
21
- SERVICE_KEY_ERROR: 'SERVICE_KEY_ERROR',
22
- /** Browser authentication failed or was cancelled */
23
- BROWSER_AUTH_ERROR: 'BROWSER_AUTH_ERROR',
24
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * Token refresh result
3
- */
4
- export interface ITokenRefreshResult {
5
- accessToken: string;
6
- refreshToken?: string;
7
- }
8
- //# sourceMappingURL=ITokenRefreshResult.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITokenRefreshResult.d.ts","sourceRoot":"","sources":["../../src/utils/ITokenRefreshResult.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +0,0 @@
1
- /**
2
- * Header validation result
3
- */
4
- import type { IValidatedAuthConfig } from './IValidatedAuthConfig';
5
- export interface IHeaderValidationResult {
6
- /** Is configuration valid? */
7
- isValid: boolean;
8
- /** Validated authentication configuration */
9
- config?: IValidatedAuthConfig;
10
- /** Validation errors */
11
- errors: string[];
12
- /** Warnings */
13
- warnings: string[];
14
- }
15
- //# sourceMappingURL=IHeaderValidationResult.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IHeaderValidationResult.d.ts","sourceRoot":"","sources":["../../src/validation/IHeaderValidationResult.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,WAAW,uBAAuB;IACtC,8BAA8B;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,wBAAwB;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,46 +0,0 @@
1
- /**
2
- * Validated authentication configuration
3
- */
4
- import type { AuthType } from '../auth/AuthType';
5
- /**
6
- * Authentication method priority
7
- * Higher number = higher priority
8
- */
9
- export declare enum AuthMethodPriority {
10
- SAP_DESTINATION = 4,// x-sap-destination (uses AuthBroker, JWT only)
11
- MCP_DESTINATION = 3,// x-mcp-destination + x-sap-auth-type=jwt (uses AuthBroker)
12
- DIRECT_JWT = 2,// x-sap-jwt-token + x-sap-auth-type=jwt
13
- BASIC = 1,// x-sap-login + x-sap-password + x-sap-auth-type=basic
14
- NONE = 0
15
- }
16
- export interface IValidatedAuthConfig {
17
- /** Authentication method priority */
18
- priority: AuthMethodPriority;
19
- /** Authentication type */
20
- authType: AuthType;
21
- /** SAP URL */
22
- sapUrl: string;
23
- /** SAP Client (optional) */
24
- sapClient?: string;
25
- /** Destination name (for destination-based auth: x-sap-destination or x-mcp-destination) */
26
- destination?: string;
27
- /** JWT token (for direct JWT auth) */
28
- jwtToken?: string;
29
- /** Refresh token (optional, for JWT auth) */
30
- refreshToken?: string;
31
- /** UAA URL (optional, for JWT auth) */
32
- uaaUrl?: string;
33
- /** UAA Client ID (optional, for JWT auth) */
34
- uaaClientId?: string;
35
- /** UAA Client Secret (optional, for JWT auth) */
36
- uaaClientSecret?: string;
37
- /** Username (for basic auth) */
38
- username?: string;
39
- /** Password (for basic auth) */
40
- password?: string;
41
- /** Validation errors (if any) */
42
- errors: string[];
43
- /** Warnings (if any) */
44
- warnings: string[];
45
- }
46
- //# sourceMappingURL=IValidatedAuthConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IValidatedAuthConfig.d.ts","sourceRoot":"","sources":["../../src/validation/IValidatedAuthConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,eAAe,IAAI,CAAE,gDAAgD;IACrE,eAAe,IAAI,CAAE,4DAA4D;IACjF,UAAU,IAAI,CAAE,wCAAwC;IACxD,KAAK,IAAI,CAAE,uDAAuD;IAClE,IAAI,IAAI;CACT;AAED,MAAM,WAAW,oBAAoB;IACnC,qCAAqC;IACrC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,0BAA0B;IAC1B,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc;IACd,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,wBAAwB;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AuthMethodPriority = void 0;
4
- /**
5
- * Authentication method priority
6
- * Higher number = higher priority
7
- */
8
- var AuthMethodPriority;
9
- (function (AuthMethodPriority) {
10
- AuthMethodPriority[AuthMethodPriority["SAP_DESTINATION"] = 4] = "SAP_DESTINATION";
11
- AuthMethodPriority[AuthMethodPriority["MCP_DESTINATION"] = 3] = "MCP_DESTINATION";
12
- AuthMethodPriority[AuthMethodPriority["DIRECT_JWT"] = 2] = "DIRECT_JWT";
13
- AuthMethodPriority[AuthMethodPriority["BASIC"] = 1] = "BASIC";
14
- AuthMethodPriority[AuthMethodPriority["NONE"] = 0] = "NONE";
15
- })(AuthMethodPriority || (exports.AuthMethodPriority = AuthMethodPriority = {}));