How to use the @aws-amplify/core.Credentials.shear function in @aws-amplify/core

To help you get started, we’ve selected a few @aws-amplify/core 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 aws-amplify / amplify-js / packages / analytics / src / Providers / AWSPinpointProvider.ts View on Github external
private async _getCredentials() {
		try {
			const credentials = await Credentials.get();
			if (!credentials) return null;

			logger.debug('set credentials for analytics', credentials);
			return Credentials.shear(credentials);
		} catch (err) {
			logger.debug('ensure credentials error', err);
			return null;
		}
	}
}
github aws-amplify / amplify-js / packages / storage / src / Providers / AWSS3Provider.ts View on Github external
.then(credentials => {
                if (!credentials) return false;
                const cred = Credentials.shear(credentials);
                logger.debug('set credentials for storage', cred);
                this._config.credentials = cred;

                return true;
            })
            .catch(err => {
github aws-amplify / amplify-js / packages / api / src / RestAPI.ts View on Github external
.then(credentials => {
				if (!credentials) return false;
				const cred = Credentials.shear(credentials);
				logger.debug('set credentials for api', cred);

				return true;
			})
			.catch(err => {
github aws-amplify / amplify-js / packages / api-graphql / src / GraphQLAPI.ts View on Github external
.then(credentials => {
				if (!credentials) return false;
				const cred = Credentials.shear(credentials);
				logger.debug('set credentials for api', cred);

				return true;
			})
			.catch(err => {
github aws-amplify / amplify-js / packages / analytics / src / Providers / AWSKinesisProvider.ts View on Github external
.then(credentials => {
				if (!credentials) return null;
				logger.debug('set credentials for analytics', this._config.credentials);
				return Credentials.shear(credentials);
			})
			.catch(err => {
github aws-amplify / amplify-js / packages / api / src / API.ts View on Github external
.then(credentials => {
				if (!credentials) return false;
				const cred = Credentials.shear(credentials);
				logger.debug('set credentials for api', cred);

				return true;
			})
			.catch(err => {
github aws-amplify / amplify-js / packages / analytics / src / Providers / AWSKinesisProvider.ts View on Github external
.then(credentials => {
				if (!credentials) return null;
				logger.debug('set credentials for analytics', that._config.credentials);
				return Credentials.shear(credentials);
			})
			.catch(err => {
github aws-amplify / amplify-js / packages / api / src / API.ts View on Github external
.then(credentials => {
                if (!credentials) return false;
                const cred = Credentials.shear(credentials);
                logger.debug('set credentials for api', cred);

                return true;
            })
            .catch(err => {