
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Fleetlog API wrapper
npm install fleetlog
This SDK is designed to be the simplest way to make request to the Fleetlog API.
var fleetlog = require('fleetlog');
// see Examples for obtaining an access token.
fleetlog.identity(token, function (err, userObject){
if (!error) {
console.log(userObject)
}
})
string, callback function)fleetlog.identity('access-token', function (err, userObject){
console.log(userObject)
})
string, callback function)fleetlog.getVehicles('access-token', { limit: 5, offset: 0}, function (err, vehicles){
console.log(vehiclesArray)
})
string, query object, callback function)fleetlog.getTrips('access-token', { limit: 5, offset: 0}, function (err, trips){
console.log(tripsArray)
})
string, tripId number, query object, callback function)fleetlog.getTrip('access-token', 12345, null, function (err, tripObject){
console.log(tripObject)
})
string, vehicleId number, query object, callback function)fleetlog.getVehicle('access-token', 12345, null, function (err, vehicleObject){
console.log(vehicleObject)
})
string, query object, callback function)fleetlog.getCoordinates('access-token', { fields: ['latitude', 'longitude', 'id', 'datetime']}, function (err, coordinates){
console.log(coordinatesArray)
})
string, tripId number, query object, callback function)fleetlog.getTripWithCoordinates('access-token', 12345, { 'coordinates[fields]': 'datetime'}, function (err, tripObject){
console.log(tripObject)
})
string, path string, data object, token string, callback function)fleetlog._fleetlogRequest('GET', 'trips?limit=5&offset=0', null, 'access-token', function (err, response){
// Response object
// { "status": 200, data: [...]} or { "status": 200, data: {...}}
console.log(response)
})
In order to make authorized calls to Fleetlog API, your application must first obtain an OAuth 2.0 access token on behalf of a Fleetlog user or you could issue Application-only authenticated requests when user context is not required. The way you will obtain such tokens will depend on your use case.
Access to web APIs by native clients and websites is implemented by using the OAuth 2.0.
The authorization code grant type is the most commonly used because it is optimized for server-side applications, where source code is not publicly exposed, and Client Secret confidentiality can be maintained. This is a redirection-based flow, which means that the application must be capable of interacting with the user-agent (i.e. the user's web browser) and receiving API authorization codes that are routed through the user-agent.
The resource owner password credentials grant type is suitable in cases where the resource owner has a trust relationship with the client, such as the device operating system or a highly privileged application. The authorization server should take special care when enabling this grant type and only allow it when other flows are not viable.
This grant type is suitable for clients capable of obtaining the resource owner’s credentials (username and password, typically using an interactive form). It is also used to migrate existing clients using direct authentication schemes such as HTTP Basic or Digest authentication to OAuth by converting the stored credentials to an access token:
References from the RFC:
Resource Owner Password Credentials
Resource Owner Password Credentials Grant
Run the app with environment variables
node app FLEETLOG_CLIENT_ID=<YOUR_CLIENT_ID> FLEETLOG_CLIENT_SECRET=<YOUR_CLIENT_SECRET>
Open localhost:3001 in your browser.
This project is licensed under the terms of the Apache 2.0 license.
FAQs
Fleetlog API wrapper
We found that fleetlog 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.