@aws-sdk/middleware-token 3.362.0 → 3.363.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.
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeTokenProvider = void 0;
4
- const property_provider_1 = require("@aws-sdk/property-provider");
5
- const util_middleware_1 = require("@aws-sdk/util-middleware");
4
+ const property_provider_1 = require("@smithy/property-provider");
5
+ const util_middleware_1 = require("@smithy/util-middleware");
6
6
  const isTokenWithExpiry = (token) => token.expiration !== undefined;
7
7
  const isTokenExpiringWithinFiveMins = (token) => isTokenWithExpiry(token) && token.expiration.getTime() - Date.now() < 300000;
8
8
  const normalizeTokenProvider = (token) => {
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tokenMiddleware = exports.tokenMiddlewareOptions = void 0;
4
- const protocol_http_1 = require("@aws-sdk/protocol-http");
5
- const types_1 = require("@aws-sdk/types");
4
+ const protocol_http_1 = require("@smithy/protocol-http");
5
+ const types_1 = require("@smithy/types");
6
6
  exports.tokenMiddlewareOptions = {
7
7
  name: "tokenMiddleware",
8
8
  tags: ["TOKEN", "AUTH"],
@@ -1,5 +1,5 @@
1
- import { memoize } from "@aws-sdk/property-provider";
2
- import { normalizeProvider } from "@aws-sdk/util-middleware";
1
+ import { memoize } from "@smithy/property-provider";
2
+ import { normalizeProvider } from "@smithy/util-middleware";
3
3
  const isTokenWithExpiry = (token) => token.expiration !== undefined;
4
4
  const isTokenExpiringWithinFiveMins = (token) => isTokenWithExpiry(token) && token.expiration.getTime() - Date.now() < 300000;
5
5
  export const normalizeTokenProvider = (token) => {
@@ -1,5 +1,5 @@
1
- import { HttpRequest } from "@aws-sdk/protocol-http";
2
- import { HttpAuthLocation, } from "@aws-sdk/types";
1
+ import { HttpRequest } from "@smithy/protocol-http";
2
+ import { HttpAuthLocation, } from "@smithy/types";
3
3
  export const tokenMiddlewareOptions = {
4
4
  name: "tokenMiddleware",
5
5
  tags: ["TOKEN", "AUTH"],
@@ -1,4 +1,4 @@
1
- import { Pluggable } from "@aws-sdk/types";
1
+ import { Pluggable } from "@smithy/types";
2
2
  import { TokenResolvedConfig } from "./configurations";
3
3
  /**
4
4
  * @internal
@@ -1,4 +1,5 @@
1
- import { MemoizedProvider, TokenIdentity, TokenIdentityProvider } from "@aws-sdk/types";
1
+ import { TokenIdentity, TokenIdentityProvider } from "@aws-sdk/types";
2
+ import { MemoizedProvider } from "@smithy/types";
2
3
  /**
3
4
  * @internal
4
5
  */
@@ -1,4 +1,4 @@
1
- import { FinalizeRequestMiddleware, RelativeMiddlewareOptions } from "@aws-sdk/types";
1
+ import { FinalizeRequestMiddleware, RelativeMiddlewareOptions } from "@smithy/types";
2
2
  import { TokenResolvedConfig } from "./configurations";
3
3
  /**
4
4
  * @internal
@@ -1,4 +1,4 @@
1
- import { Pluggable } from "@aws-sdk/types";
1
+ import { Pluggable } from "@smithy/types";
2
2
  import { TokenResolvedConfig } from "./configurations";
3
3
  export declare const getTokenPlugin: (
4
4
  options: TokenResolvedConfig
@@ -1,8 +1,5 @@
1
- import {
2
- MemoizedProvider,
3
- TokenIdentity,
4
- TokenIdentityProvider,
5
- } from "@aws-sdk/types";
1
+ import { TokenIdentity, TokenIdentityProvider } from "@aws-sdk/types";
2
+ import { MemoizedProvider } from "@smithy/types";
6
3
  export declare const normalizeTokenProvider: (
7
4
  token: TokenIdentity | TokenIdentityProvider
8
5
  ) => MemoizedProvider<TokenIdentity>;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FinalizeRequestMiddleware,
3
3
  RelativeMiddlewareOptions,
4
- } from "@aws-sdk/types";
4
+ } from "@smithy/types";
5
5
  import { TokenResolvedConfig } from "./configurations";
6
6
  export declare const tokenMiddlewareOptions: RelativeMiddlewareOptions;
7
7
  export declare const tokenMiddleware: <
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-token",
3
- "version": "3.362.0",
3
+ "version": "3.363.0",
4
4
  "description": "Middleware and Plugin for setting token authentication",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -26,11 +26,12 @@
26
26
  },
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@aws-sdk/property-provider": "3.357.0",
30
- "@aws-sdk/protocol-http": "3.357.0",
31
- "@aws-sdk/token-providers": "3.362.0",
29
+ "@aws-sdk/token-providers": "3.363.0",
32
30
  "@aws-sdk/types": "3.357.0",
33
- "@aws-sdk/util-middleware": "3.357.0",
31
+ "@smithy/property-provider": "^1.0.1",
32
+ "@smithy/protocol-http": "^1.1.0",
33
+ "@smithy/types": "^1.1.0",
34
+ "@smithy/util-middleware": "^1.0.1",
34
35
  "tslib": "^2.5.0"
35
36
  },
36
37
  "devDependencies": {