
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
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 7,672 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.