Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Node Library for Authenticating with ExactTarget Fuel. Used for authenticating REST and SOAP APIs.
This library allows users to create authentication clients for ExactTarget APIs.
Use our REST and SOAP clients to interact with these APIs at a low-level.
This library is compatible with node versions 0.8 and 0.10+. npm install
will error if you're using node version 0.8 with developer dependencies. To have a successful install for testing/contributing use npm install -g npm@1.2.8000
and the issue should be resolved.
This is a new library and requires extensive testing. Feel free to test it out and submit issues as they are found.
npm install fuel-auth --save
new FuelAuth( options )
Object
options
Object
options.force
Boolean
false
callback( error, data )
Function
null
if no errortrue
if token is not expired and it exists. false
if token is expired or it doesn't exist.var FuelAuth = require( 'fuel-auth' );
// Required Settings
var myClientId = 'yourClientId';
var myClientSecret = 'yourClientSecret';
// Minimal Initialization
var FuelAuthClient = new FuelAuth({
clientId: myClientId // required
, clientSecret: myClientSecret // required
});
// Initialization with extra options
var authUrl = "https://auth.exacttargetapis.com/v1/requestToken"; //this is the default
var accessToken = "";
var refreshToken = "";
var FuelAuthClient = new FuelAuth({
clientId: myClientId // required
, clientSecret: myClientSecret // required
, authUrl: authUrl
, accessToken: accessToken
, refreshToken: refreshToken
});
var options = {
// whatever request options you want
// See https://github.com/mikeal/request#requestoptions-callback
// I want to force a request
force: true
};
FuelAuthClient.getAccessToken( options, function( err, data ) {
if( !!err ) {
console.log( err );
return;
}
// data.accessToken = your token
// data.expiresIn = how long until token expiration
console.log( data );
});
// OR don't pass any options
FuelAuthClient.getAccessToken( function( err, data ) {
if( !!err ) {
console.log( err );
return;
}
// data.accessToken = your token
// data.expiresIn = how long until token expiration
console.log( data );
});
In alphabetical order
We welcome all contributions and issues! There's only one way to make this better, and that's by using it. If you would like to contribute, please checkout our guidelines!
fuel-auth
FAQs
Node library for authenticating REST and SOAP APIs in the Salesforce Marketing Cloud (formerly ExactTarget).
The npm package fuel-auth receives a total of 6,924 weekly downloads. As such, fuel-auth popularity was classified as popular.
We found that fuel-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.