@cinerino/sdk 18.4.0-alpha.0 → 18.4.0-alpha.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.
@@ -12,6 +12,7 @@ export interface IOptions {
12
12
  nonce: string | null;
13
13
  audience?: string;
14
14
  tokenIssuer: string;
15
+ iapHeaderGenerator?: never;
15
16
  }
16
17
  /**
17
18
  * OAuth2 client using grant type 'implicit grant'
@@ -21,7 +22,8 @@ export declare class ImplicitGrantClient extends OAuth2client {
21
22
  static LOGOUT_URL: string;
22
23
  options: IOptions;
23
24
  credentials: ICredentials;
24
- constructor(options: IOptions);
25
+ constructor({ iapHeaderGenerator: _iapHeaderGenerator, // browserではひとまず非対応(2026-11-05~)
26
+ ...options }: IOptions);
25
27
  static BUILD_PASRSE_HASH_RESPONS(qsParams: any, __: string, idTokenPayload: any): ICredentials;
26
28
  isSignedIn(): Promise<ICredentials | null>;
27
29
  getAccessToken(): Promise<string>;
@@ -23,7 +23,8 @@ class ImplicitGrantClient extends oAuth2client_1.OAuth2client {
23
23
  static LOGOUT_URL = '/logout';
24
24
  options;
25
25
  credentials;
26
- constructor(options) {
26
+ constructor({ iapHeaderGenerator: _iapHeaderGenerator, // browserではひとまず非対応(2026-11-05~)
27
+ ...options }) {
27
28
  // assert.check(
28
29
  // options,
29
30
  // { type: 'object', message: 'options parameter is not valid' },
@@ -257,6 +257,7 @@ class OAuth2client {
257
257
  // support IAP(2026-11-04~)
258
258
  /* istanbul ignore if */
259
259
  if (typeof this.options.iapHeaderGenerator === 'function') {
260
+ console.log('await this.options.iapHeaderGenerator():', await this.options.iapHeaderGenerator());
260
261
  headers.set('Proxy-Authorization', `${await this.options.iapHeaderGenerator()}`);
261
262
  }
262
263
  headers.set('Authorization', `Bearer ${await this.getAccessToken()}`);
package/lib/browser.d.ts CHANGED
@@ -7,4 +7,4 @@ export { loadCloudAdmin, loadCloudAsset, loadCloudPay, loadCloudSearch, loadClou
7
7
  /**
8
8
  * create OAuth2 client instance using implicit grant
9
9
  */
10
- export declare function createAuthInstance(options: IImplicitGrantClientOptions): ImplicitGrantClient;
10
+ export declare function createAuthInstance(options: Pick<IImplicitGrantClientOptions, 'audience' | 'clientId' | 'domain' | 'logoutUri' | 'nonce' | 'redirectUri' | 'responseMode' | 'responseType' | 'scope' | 'state' | 'tokenIssuer'>): ImplicitGrantClient;