@mcp-abap-adt/interfaces 0.2.8 → 0.2.10
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/CHANGELOG.md +13 -0
- package/README.md +3 -5
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/token/AuthType.d.ts +9 -6
- package/dist/token/AuthType.d.ts.map +1 -1
- package/dist/token/AuthType.js +9 -6
- package/dist/token/ITokenProvider.d.ts +5 -37
- package/dist/token/ITokenProvider.d.ts.map +1 -1
- package/dist/token/ITokenProvider.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.10] - 2025-12-24
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **Breaking**: `ITokenProvider` is now stateful only and requires `getTokens(authConfig, options)`.
|
|
14
|
+
- Removed legacy stateless token methods from `ITokenProvider`.
|
|
15
|
+
- Removed `ITokenProviderResult` from public exports.
|
|
16
|
+
- Updated README examples to use `getTokens()`.
|
|
17
|
+
|
|
18
|
+
## [0.2.9] - 2025-12-23
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- **OAuth2 grant types**: Removed `AUTH_TYPE_IMPLICIT` and added `AUTH_TYPE_USER_TOKEN` and `AUTH_TYPE_CLIENT_X509` to `OAuth2GrantType`.
|
|
22
|
+
|
|
10
23
|
## [0.2.8] - 2025-12-23
|
|
11
24
|
|
|
12
25
|
### Added
|
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
|
|
86
86
|
// Token Provider Error Codes
|
|
87
87
|
try {
|
|
88
|
-
await tokenProvider.
|
|
88
|
+
await tokenProvider.getTokens(authConfig);
|
|
89
89
|
} catch (error: any) {
|
|
90
90
|
if (error.code === TOKEN_PROVIDER_ERROR_CODES.VALIDATION_ERROR) {
|
|
91
91
|
console.error('Invalid auth config:', error.missingFields);
|
|
@@ -163,13 +163,12 @@ This package is responsible for:
|
|
|
163
163
|
- `AuthType` - Auth type: `'jwt' | 'xsuaa' | 'basic'`
|
|
164
164
|
|
|
165
165
|
### Token Domain (`token/`)
|
|
166
|
-
- `ITokenProvider` - Token provider interface (
|
|
167
|
-
- `ITokenProviderResult` - Result from token provider
|
|
166
|
+
- `ITokenProvider` - Token provider interface (stateful token lifecycle)
|
|
168
167
|
- `ITokenProviderOptions` - Options for token providers
|
|
169
168
|
- `ITokenRefresher` - Token refresher interface for DI into connections
|
|
170
169
|
- Created by `AuthBroker.createTokenRefresher(destination)`
|
|
171
170
|
- Injected into `JwtAbapConnection` to enable automatic token refresh
|
|
172
|
-
- Methods: `
|
|
171
|
+
- Methods: `getTokens()`
|
|
173
172
|
|
|
174
173
|
### Session Domain (`session/`)
|
|
175
174
|
- `ISessionStore` - Session storage interface
|
|
@@ -224,4 +223,3 @@ This package has **no runtime dependencies**. It only has devDependencies for Ty
|
|
|
224
223
|
## License
|
|
225
224
|
|
|
226
225
|
MIT
|
|
227
|
-
|
package/dist/index.d.ts
CHANGED
|
@@ -27,10 +27,9 @@ export type { ISessionStorage } from './storage/ISessionStorage';
|
|
|
27
27
|
export type { StoreErrorCode } from './store/StoreErrorCodes';
|
|
28
28
|
export { STORE_ERROR_CODES } from './store/StoreErrorCodes';
|
|
29
29
|
export type { OAuth2GrantType } from './token/AuthType';
|
|
30
|
-
export { AUTH_TYPE_AUTHORIZATION_CODE, AUTH_TYPE_AUTHORIZATION_CODE_PKCE, AUTH_TYPE_CLIENT_CREDENTIALS,
|
|
30
|
+
export { AUTH_TYPE_AUTHORIZATION_CODE, AUTH_TYPE_AUTHORIZATION_CODE_PKCE, AUTH_TYPE_CLIENT_CREDENTIALS, AUTH_TYPE_CLIENT_X509, AUTH_TYPE_PASSWORD, AUTH_TYPE_USER_TOKEN, } from './token/AuthType';
|
|
31
31
|
export type { ITokenProvider } from './token/ITokenProvider';
|
|
32
32
|
export type { ITokenProviderOptions } from './token/ITokenProviderOptions';
|
|
33
|
-
export type { ITokenProviderResult } from './token/ITokenProviderResult';
|
|
34
33
|
export type { ITokenRefresher } from './token/ITokenRefresher';
|
|
35
34
|
export type { ITokenResult } from './token/ITokenResult';
|
|
36
35
|
export type { TokenProviderErrorCode } from './token/TokenProviderErrorCodes';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC/E,YAAY,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEhE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,YAAY,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,YAAY,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACL,cAAc,EACd,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAEpC,cAAc,WAAW,CAAC;AAE1B,YAAY,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB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AC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.AuthMethodPriority = exports.TOKEN_PROVIDER_ERROR_CODES = exports.AUTH_TYPE_PASSWORD = exports.
|
|
23
|
+
exports.AuthMethodPriority = exports.TOKEN_PROVIDER_ERROR_CODES = exports.AUTH_TYPE_USER_TOKEN = exports.AUTH_TYPE_PASSWORD = exports.AUTH_TYPE_CLIENT_X509 = exports.AUTH_TYPE_CLIENT_CREDENTIALS = exports.AUTH_TYPE_AUTHORIZATION_CODE_PKCE = exports.AUTH_TYPE_AUTHORIZATION_CODE = exports.STORE_ERROR_CODES = exports.LogLevel = exports.NETWORK_ERROR_CODES = exports.isNetworkError = exports.AdtObjectErrorCodes = void 0;
|
|
24
24
|
var IAdtObject_1 = require("./adt/IAdtObject");
|
|
25
25
|
Object.defineProperty(exports, "AdtObjectErrorCodes", { enumerable: true, get: function () { return IAdtObject_1.AdtObjectErrorCodes; } });
|
|
26
26
|
var NetworkErrors_1 = require("./connection/NetworkErrors");
|
|
@@ -37,8 +37,9 @@ var AuthType_1 = require("./token/AuthType");
|
|
|
37
37
|
Object.defineProperty(exports, "AUTH_TYPE_AUTHORIZATION_CODE", { enumerable: true, get: function () { return AuthType_1.AUTH_TYPE_AUTHORIZATION_CODE; } });
|
|
38
38
|
Object.defineProperty(exports, "AUTH_TYPE_AUTHORIZATION_CODE_PKCE", { enumerable: true, get: function () { return AuthType_1.AUTH_TYPE_AUTHORIZATION_CODE_PKCE; } });
|
|
39
39
|
Object.defineProperty(exports, "AUTH_TYPE_CLIENT_CREDENTIALS", { enumerable: true, get: function () { return AuthType_1.AUTH_TYPE_CLIENT_CREDENTIALS; } });
|
|
40
|
-
Object.defineProperty(exports, "
|
|
40
|
+
Object.defineProperty(exports, "AUTH_TYPE_CLIENT_X509", { enumerable: true, get: function () { return AuthType_1.AUTH_TYPE_CLIENT_X509; } });
|
|
41
41
|
Object.defineProperty(exports, "AUTH_TYPE_PASSWORD", { enumerable: true, get: function () { return AuthType_1.AUTH_TYPE_PASSWORD; } });
|
|
42
|
+
Object.defineProperty(exports, "AUTH_TYPE_USER_TOKEN", { enumerable: true, get: function () { return AuthType_1.AUTH_TYPE_USER_TOKEN; } });
|
|
42
43
|
var TokenProviderErrorCodes_1 = require("./token/TokenProviderErrorCodes");
|
|
43
44
|
Object.defineProperty(exports, "TOKEN_PROVIDER_ERROR_CODES", { enumerable: true, get: function () { return TokenProviderErrorCodes_1.TOKEN_PROVIDER_ERROR_CODES; } });
|
|
44
45
|
var IValidatedAuthConfig_1 = require("./validation/IValidatedAuthConfig");
|
package/dist/token/AuthType.d.ts
CHANGED
|
@@ -13,11 +13,6 @@ export declare const AUTH_TYPE_AUTHORIZATION_CODE: "authorization_code";
|
|
|
13
13
|
* More secure variant for public clients
|
|
14
14
|
*/
|
|
15
15
|
export declare const AUTH_TYPE_AUTHORIZATION_CODE_PKCE: "authorization_code_pkce";
|
|
16
|
-
/**
|
|
17
|
-
* Implicit grant type
|
|
18
|
-
* Legacy OAuth2 flow (deprecated, not recommended)
|
|
19
|
-
*/
|
|
20
|
-
export declare const AUTH_TYPE_IMPLICIT: "implicit";
|
|
21
16
|
/**
|
|
22
17
|
* Password Credentials grant type
|
|
23
18
|
* Direct username/password authentication
|
|
@@ -28,8 +23,16 @@ export declare const AUTH_TYPE_PASSWORD: "password";
|
|
|
28
23
|
* Service-to-service authentication
|
|
29
24
|
*/
|
|
30
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";
|
|
31
34
|
/**
|
|
32
35
|
* Union type for all OAuth2 grant types
|
|
33
36
|
*/
|
|
34
|
-
export type OAuth2GrantType = typeof AUTH_TYPE_AUTHORIZATION_CODE | typeof AUTH_TYPE_AUTHORIZATION_CODE_PKCE | typeof
|
|
37
|
+
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;
|
|
35
38
|
//# sourceMappingURL=AuthType.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,OAAO,4BAA4B,GACnC,OAAO,iCAAiC,GACxC,OAAO,kBAAkB,GACzB,OAAO,4BAA4B,GACnC,OAAO,oBAAoB,GAC3B,OAAO,qBAAqB,CAAC"}
|
package/dist/token/AuthType.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Constants for different OAuth2 authentication flows (grant types)
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
8
|
+
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
9
|
/**
|
|
10
10
|
* Authorization Code grant type
|
|
11
11
|
* Standard OAuth2 flow with browser-based authorization
|
|
@@ -16,11 +16,6 @@ exports.AUTH_TYPE_AUTHORIZATION_CODE = 'authorization_code';
|
|
|
16
16
|
* More secure variant for public clients
|
|
17
17
|
*/
|
|
18
18
|
exports.AUTH_TYPE_AUTHORIZATION_CODE_PKCE = 'authorization_code_pkce';
|
|
19
|
-
/**
|
|
20
|
-
* Implicit grant type
|
|
21
|
-
* Legacy OAuth2 flow (deprecated, not recommended)
|
|
22
|
-
*/
|
|
23
|
-
exports.AUTH_TYPE_IMPLICIT = 'implicit';
|
|
24
19
|
/**
|
|
25
20
|
* Password Credentials grant type
|
|
26
21
|
* Direct username/password authentication
|
|
@@ -31,3 +26,11 @@ exports.AUTH_TYPE_PASSWORD = 'password';
|
|
|
31
26
|
* Service-to-service authentication
|
|
32
27
|
*/
|
|
33
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';
|
|
@@ -2,56 +2,24 @@
|
|
|
2
2
|
* Token Provider interface
|
|
3
3
|
*
|
|
4
4
|
* Stateful providers that manage token lifecycle internally.
|
|
5
|
-
*
|
|
5
|
+
* The provider validates, refreshes, or re-authenticates as needed.
|
|
6
6
|
*/
|
|
7
7
|
import type { IAuthorizationConfig } from '../auth/IAuthorizationConfig';
|
|
8
8
|
import type { ITokenProviderOptions } from './ITokenProviderOptions';
|
|
9
|
-
import type { ITokenProviderResult } from './ITokenProviderResult';
|
|
10
9
|
import type { ITokenResult } from './ITokenResult';
|
|
11
10
|
/**
|
|
12
|
-
* Interface for token providers
|
|
13
|
-
*
|
|
14
|
-
* Supports both:
|
|
15
|
-
* - Old stateless methods (for backward compatibility with existing code)
|
|
16
|
-
* - New stateful getTokens() method (for new implementations)
|
|
11
|
+
* Interface for token providers (stateful)
|
|
17
12
|
*/
|
|
18
13
|
export interface ITokenProvider {
|
|
19
14
|
/**
|
|
20
|
-
* Get tokens with automatic refresh/relogin logic
|
|
15
|
+
* Get tokens with automatic refresh/relogin logic
|
|
21
16
|
*
|
|
22
17
|
* Stateful providers cache tokens internally and handle refresh automatically.
|
|
23
18
|
* Checks token expiration, refreshes if needed, or triggers login.
|
|
24
|
-
*
|
|
25
|
-
* @returns Promise that resolves to token result with authorization token, optional refresh token, auth type, and expiration
|
|
26
|
-
*/
|
|
27
|
-
getTokens?(): Promise<ITokenResult>;
|
|
28
|
-
/**
|
|
29
|
-
* Get connection configuration with token from authorization configuration (OLD - stateless method)
|
|
30
|
-
* @param authConfig Authorization configuration (UAA credentials, optional refresh token)
|
|
31
|
-
* @param options Optional provider-specific options (e.g., browser type for BTP)
|
|
32
|
-
* @returns Promise that resolves to connection configuration with authorization token and optional refresh token
|
|
33
|
-
*/
|
|
34
|
-
getConnectionConfig?(authConfig: IAuthorizationConfig, options?: ITokenProviderOptions): Promise<ITokenProviderResult>;
|
|
35
|
-
/**
|
|
36
|
-
* Refresh token using refresh token from session (OLD - stateless method)
|
|
37
|
-
* This method uses the refresh token from the session to get a new access token.
|
|
38
|
-
* Typically uses refresh_token grant type or browser-based re-authentication.
|
|
39
|
-
* @param authConfig Authorization configuration including refreshToken from session
|
|
40
|
-
* @param options Optional provider-specific options (e.g., browser type for BTP)
|
|
41
|
-
* @returns Promise that resolves to connection configuration with new authorization token and optional new refresh token
|
|
42
|
-
*/
|
|
43
|
-
refreshTokenFromSession?(authConfig: IAuthorizationConfig, options?: ITokenProviderOptions): Promise<ITokenProviderResult>;
|
|
44
|
-
/**
|
|
45
|
-
* Refresh token using UAA credentials from service key (OLD - stateless method)
|
|
46
|
-
* This method uses UAA credentials (uaaUrl, uaaClientId, uaaClientSecret) to get a new token.
|
|
47
|
-
* Typically uses browser-based authorization flow to ensure proper role assignment.
|
|
48
|
-
* @param authConfig Authorization configuration with UAA credentials from service key (no refreshToken)
|
|
49
|
-
* @param options Optional provider-specific options (e.g., browser type for BTP)
|
|
50
|
-
* @returns Promise that resolves to connection configuration with new authorization token and optional refresh token
|
|
51
19
|
*/
|
|
52
|
-
|
|
20
|
+
getTokens(authConfig: IAuthorizationConfig, options?: ITokenProviderOptions): Promise<ITokenResult>;
|
|
53
21
|
/**
|
|
54
|
-
* Validate JWT token
|
|
22
|
+
* Validate JWT token locally (optional)
|
|
55
23
|
* @param token JWT token to validate
|
|
56
24
|
* @param serviceUrl Service URL (optional, for services that require URL validation)
|
|
57
25
|
* @returns Promise that resolves to true if token is valid, false otherwise
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITokenProvider.d.ts","sourceRoot":"","sources":["../../src/token/ITokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ITokenProvider.d.ts","sourceRoot":"","sources":["../../src/token/ITokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,SAAS,CACP,UAAU,EAAE,oBAAoB,EAChC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzB;;;;;OAKG;IACH,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtE"}
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* Token Provider interface
|
|
4
4
|
*
|
|
5
5
|
* Stateful providers that manage token lifecycle internally.
|
|
6
|
-
*
|
|
6
|
+
* The provider validates, refreshes, or re-authenticates as needed.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|