@mcp-abap-adt/interfaces 0.2.0 → 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/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.1] - 2025-12-19
11
+
12
+ ### Added
13
+ - **Token Refresh Methods in ITokenProvider**: Added two new methods to `ITokenProvider` interface for explicit refresh scenarios
14
+ - `refreshTokenFromSession(authConfig, options?)` - Refresh token using refresh token from session
15
+ - Uses refresh token from `authConfig.refreshToken` to get new access token
16
+ - Typically uses refresh_token grant type or browser-based re-authentication
17
+ - Returns new authorization token and optional new refresh token
18
+ - `refreshTokenFromServiceKey(authConfig, options?)` - Refresh token using UAA credentials from service key
19
+ - Uses UAA credentials (uaaUrl, uaaClientId, uaaClientSecret) without refresh token
20
+ - Typically uses browser-based authorization flow to ensure proper role assignment
21
+ - Returns new authorization token and optional refresh token
22
+ - These methods provide explicit control over token refresh strategy in AuthBroker
23
+ - Allows separation of refresh-by-session vs refresh-by-service-key logic in token providers
24
+
10
25
  ## [0.2.0] - 2025-12-19
11
26
 
12
27
  ### Added
@@ -22,6 +22,24 @@ export interface ITokenProvider {
22
22
  * @returns Promise that resolves to connection configuration with authorization token and optional refresh token
23
23
  */
24
24
  getConnectionConfig(authConfig: IAuthorizationConfig, options?: ITokenProviderOptions): Promise<ITokenProviderResult>;
25
+ /**
26
+ * Refresh token using refresh token from session (authorization config with refreshToken)
27
+ * This method uses the refresh token from the session to get a new access token.
28
+ * Typically uses refresh_token grant type or browser-based re-authentication.
29
+ * @param authConfig Authorization configuration including refreshToken from session
30
+ * @param options Optional provider-specific options (e.g., browser type for BTP)
31
+ * @returns Promise that resolves to connection configuration with new authorization token and optional new refresh token
32
+ */
33
+ refreshTokenFromSession(authConfig: IAuthorizationConfig, options?: ITokenProviderOptions): Promise<ITokenProviderResult>;
34
+ /**
35
+ * Refresh token using UAA credentials from service key (authorization config without refreshToken)
36
+ * This method uses UAA credentials (uaaUrl, uaaClientId, uaaClientSecret) to get a new token.
37
+ * Typically uses browser-based authorization flow to ensure proper role assignment.
38
+ * @param authConfig Authorization configuration with UAA credentials from service key (no refreshToken)
39
+ * @param options Optional provider-specific options (e.g., browser type for BTP)
40
+ * @returns Promise that resolves to connection configuration with new authorization token and optional refresh token
41
+ */
42
+ refreshTokenFromServiceKey(authConfig: IAuthorizationConfig, options?: ITokenProviderOptions): Promise<ITokenProviderResult>;
25
43
  /**
26
44
  * Validate JWT token by testing connection to service
27
45
  * @param token JWT token to validate
@@ -1 +1 @@
1
- {"version":3,"file":"ITokenProvider.d.ts","sourceRoot":"","sources":["../../src/token/ITokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,mBAAmB,CACjB,UAAU,EAAE,oBAAoB,EAChC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC;;;;;OAKG;IACH,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtE"}
1
+ {"version":3,"file":"ITokenProvider.d.ts","sourceRoot":"","sources":["../../src/token/ITokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,mBAAmB,CACjB,UAAU,EAAE,oBAAoB,EAChC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC;;;;;;;OAOG;IACH,uBAAuB,CACrB,UAAU,EAAE,oBAAoB,EAChC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC;;;;;;;OAOG;IACH,0BAA0B,CACxB,UAAU,EAAE,oBAAoB,EAChC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC;;;;;OAKG;IACH,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/interfaces",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Shared interfaces for MCP ABAP ADT packages",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",