Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@ruanitto/adonis-oauth2-provider
Advanced tools
Implemented: password grant refresh_token grant
In auth.js add:
oauth2: {
keysPath: Env.get('APP_OAUTHKEY_PATH', 'authkeys'),
serializer: 'lucidOAuth2', // Can be lucidOAuth2 OR databaseOAuth2
model: 'App/Models/User',
scheme: 'oauth2',
uid: 'email',
password: 'password',
refreshTokenLifetime: '14d', // Refresh Token Duration
allowExtendedTokenAttributes: false,
requireClientAuthentication: true,
alwaysIssueNewRefreshToken: true, // Revoke old refresh token
options: {
algorithm: 'RS256',
secret: fs.existsSync(Env.get('APP_OAUTHKEY_PATH', 'authkeys') + '/oauth-private.key') ? fs.readFileSync(Env.get('APP_OAUTHKEY_PATH', 'authkeys') + '/oauth-private.key') : Logger.error('OAuth Keys not found! Please, run `adonis oauth:key` to generate.'),
public: fs.existsSync(Env.get('APP_OAUTHKEY_PATH', 'authkeys') + '/oauth-public.key') ? fs.readFileSync(Env.get('APP_OAUTHKEY_PATH', 'authkeys') + '/oauth-public.key') : Logger.error('OAuth Keys not found! Please, run `adonis oauth:key` to generate.'),
expiresIn: Env.get('TOKEN_EXPIRE', '15d'),
notBefore: 0
}
}
'@ruanitto/adonis-oauth2-provider/providers/OAuth2Provider' - Auth Provider '@ruanitto/adonis-oauth2-provider/providers/OAuth2RoutesProvider' - Register Routes (Optional)
Scope
static scopeFindForOAuth2(builder, username) {
...function for search
}
validation
validateForOAuth2(password) {
...function for validation
}
TODO authorization_code grant client_credentials grant
Routes auto instalation instructions
FAQs
Adonis OAuth2 Provider
The npm package @ruanitto/adonis-oauth2-provider receives a total of 0 weekly downloads. As such, @ruanitto/adonis-oauth2-provider popularity was classified as not popular.
We found that @ruanitto/adonis-oauth2-provider 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.