
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@evokegroup/oauth2
Advanced tools
Library for helping with OAuth 2.0 authorizations
Parameter | Type | Default | Description |
---|---|---|---|
authResponse | object ,string | The authorization response | |
value | string | null | An existing access token value |
expires | number | 0 | The expiration date for an existing token |
Returns the access token value
Returns the expiration date
Returns the date the AccessToken was created
Get a parameter that was returned with the authorization response or all parameters if null
For JSON.stringify
Parses an AccessToken
Abstract base class for authorization implementations
Determines if a valid AccessToken exists via getAccessToken
and is valid via AccessToken.isExpired
and if so resolved the Promise
passing in the token. Otherwise authenticate
is called.
An OAuth2.Authorizer
implementation which makes a web request to retrive the token
Parameter | Type | Default | Description |
---|---|---|---|
url | string | The authentication server URL | |
clientId | string | null | The client_id parameter |
clientSecret | string | null | The client_secret parameter |
scope | string | null | The scope parameter |
grantType | string | client_credentials | The grant_type parameter. If for some reason this should not be part of the payload, set it to null . |
parameters | object | {} | Additional payload parameters. Overrides other data. |
contentType | string | application/json | The Content-Type request header. |
headers | object | {} | Additional request headers. Override other data. |
timeout | number | 30000 | The request timeout in milliseconds |
cache | boolean | true | If true, the OAuth2.AccessToken created during authentication will be cached and reused while valid |
const OAuth2 = require('@evokegroup/oauth2');
const webTokenAuthorizer = new OAuth2.WebTokenAuthorizer({
url: 'https://api.domain.com/auth/token',
clientId: 'abc',
clientSecret: '123'
});
webTokenAuthorizer.authorize()
.then((accessToken) => {
// do something with the access token
})
FAQs
Helper for OAuth2
We found that @evokegroup/oauth2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.