- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8 - Actualizaciones de configuracion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
8 lines
324 B
JavaScript
8 lines
324 B
JavaScript
import { TokenProviderError } from "@smithy/property-provider";
|
|
import { REFRESH_MESSAGE } from "./constants";
|
|
export const validateTokenExpiry = (token) => {
|
|
if (token.expiration && token.expiration.getTime() < Date.now()) {
|
|
throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
|
|
}
|
|
};
|