Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
11 lines
472 B
Text
11 lines
472 B
Text
import { HttpRequest } from "@smithy/protocol-http";
|
|
export class HttpBearerAuthSigner {
|
|
async sign(httpRequest, identity, signingProperties) {
|
|
const clonedRequest = HttpRequest.clone(httpRequest);
|
|
if (!identity.token) {
|
|
throw new Error("request could not be signed with `token` since the `token` is not defined");
|
|
}
|
|
clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`;
|
|
return clonedRequest;
|
|
}
|
|
}
|