How to use the aws4.RequestSigner function in aws4

To help you get started, we’ve selected a few aws4 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / aws4 / aws4-tests.ts View on Github external
import * as aws4 from "aws4";

let requestSigner = new aws4.RequestSigner({}, {});
requestSigner.matchHost("");
requestSigner.isSingleRegion();
requestSigner.createHost();
requestSigner.prepareRequest();
requestSigner.sign();
requestSigner.getDateTime();
requestSigner.getDate();
requestSigner.authHeader();
requestSigner.signature();
requestSigner.stringToSign();
requestSigner.canonicalString();
requestSigner.canonicalHeaders();
requestSigner.signedHeaders();
requestSigner.credentialString();
requestSigner.defaultCredentials();
requestSigner.parsePath();
github superfly / edge / src / aws.ts View on Github external
fetch(opts: RequestOptions, credentials: Credentials) {
        let signer = new RequestSigner(opts, credentials);
        signer.request.protocol = 'https:';
        signer.sign();
        const req = signer.request;
        let url = `${req.protocol}//${req.hostname}${req.path}`
        console.debug("AWS S3 requesting URL:", url)
        return fetch(url, { method: req.method, headers: req.headers });
    },
    sign
github NativeScript / nativescript-cloud / resources / git / aws-credential-helper / code-commit-credential-helper.js View on Github external
function writeGitParameters(options) {
	let username = credentials.accessKeyId;
	if (credentials.sessionToken) {
		username += `%${credentials.sessionToken}`;
	}

	options.service = SERVICE;
	options.method = METHOD;
	const signer = new aws4.RequestSigner(options, credentials);
	const password = `${signer.getDateTime()}Z${signer.signature()}`

	console.log(`username=${username}`);
	console.log(`password=${password}`);
}

aws4

Signs and prepares requests using AWS Signature Version 4

MIT
Latest version published 1 year ago

Package Health Score

76 / 100
Full package analysis

Popular aws4 functions