
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
client-credentials
Advanced tools
Provides the access token for Azure Active Directory (AAD) resources using client credentials.
Provides the access token for Azure Active Directory (AAD) resources using client credentials.
Version 1.1.1
Exports the ClientCredentials
class that provides the getAccessToken
method. The mechanism by which the access token is obtained is described by the Service to Service Calls Using Client Credentials article.
$ npm install --save client-credentials
const ClientCredentials = require('client-credentials');
const credentials = new ClientCredentials('my-company.com', 'client-id', 'client-secret');
credentials.getAccessToken('https://my-resource.com').then(token => {
console.log('Access Token', token);
})
You can request access tokens for any number of resources. The tokens are cached and refreshed automatically.
ClientCredentials(tenant, clientId, clientSecret)
Creates a new ClientCredentials
instance for the specified tenant
. The clientId
and the clientSecret
must be for an AAD application that has access rights to the resource specified as the first parameter to the getAccessToken
method.
getAccessToken(resource)
Gets the access token for the specified resource. If no token exists in the token cache, it is requested from the Microsoft login service at login.microsoftonline.com
. This method returns a promise that is resolved with the access token.
The MIT License (MIT)
Copyright (c) 2017 Frank Hellwig
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Provides the access token for Azure Active Directory (AAD) resources using client credentials.
The npm package client-credentials receives a total of 21 weekly downloads. As such, client-credentials popularity was classified as not popular.
We found that client-credentials 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.