New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vertx/auth-jdbc

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vertx/auth-jdbc - npm Package Compare versions

Comparing version 3.9.4 to 4.0.0-CR1

90

index.d.ts

@@ -24,3 +24,3 @@ /*

/**
* Factory interface for creating {@link AuthProvider} instances that use the Vert.x JDBC client.
* Factory interface for creating {@link AuthenticationProvider} instances that use the Vert.x JDBC client.
*

@@ -113,3 +113,52 @@ * By default the hashing strategy is SHA-512. If you're already running in production this is backwards

import { AuthenticationProvider } from '@vertx/auth-common';
import { JDBCAuthenticationOptions } from './options';
/**
* Factory interface for creating {@link AuthenticationProvider} instances that use the Vert.x JDBC client.
*
* By default the hashing strategy is SHA-512. If you're already running in production this is backwards
* compatible, however for new deployments or security upgrades it is recommended to use the PBKDF2 strategy
* as it is the current OWASP recommendation for password storage.
*/
export abstract class JDBCAuthentication extends AuthenticationProvider {
/**
* Create a JDBC auth provider implementation
*/
static create(client: JDBCClient, hashStrategy: JDBCHashStrategy, options: JDBCAuthenticationOptions) : JDBCAuthentication;
/**
* Create a JDBC auth provider implementation
*/
static create(client: JDBCClient, options: JDBCAuthenticationOptions) : JDBCAuthentication;
/**
* Hashes a password to be stored.
*
* See: {@link HashingStrategy#hash}
*/
hash(id: string, params: { [key: string]: string; }, salt: string, password: string) : string;
/**
* Hashes a password to be stored.
*
* See: {@link HashingStrategy#hash}
*/
hash(id: string, salt: string, password: string) : string;
}
import { AuthorizationProvider } from '@vertx/auth-common';
import { JDBCAuthorizationOptions } from './options';
/**
* Factory interface for creating instances that use the Vert.x JDBC client.
*/
export abstract class JDBCAuthorization extends AuthorizationProvider {
/**
* Create a JDBC authorization provider implementation
*/
static create(providerId: string, client: JDBCClient, options: JDBCAuthorizationOptions) : JDBCAuthorization;
}
/**
* Determines how the hashing is computed in the implementation

@@ -175,1 +224,40 @@ *

}
import { Future } from '@vertx/core';
/**
* Utility to create users/roles/permissions. This is a helper class and not intended to be a full user
* management utility. While the standard authentication and authorization interfaces will require usually
* read only access to the database, in order to use this API a full read/write access must be granted.
*/
export abstract class JDBCUserUtil {
/**
* Create an instance of the user helper.
*/
static create(client: JDBCClient) : JDBCUserUtil;
/**
* Create an instance of the user helper with custom queries.
*/
static create(client: JDBCClient, insertUserSQL: string, insertUserRoleSQL: string, insertRolePermissionSQL: string) : JDBCUserUtil;
/**
* Insert a user into a database.
*/
createUser(username: string, password: string, resultHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>) : JDBCUserUtil;
/**
* Insert a user into a database.
*/
createHashedUser(username: string, hash: string, resultHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>) : JDBCUserUtil;
/**
* Insert a user role into a database.
*/
createUserRole(username: string, role: string, resultHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>) : JDBCUserUtil;
/**
* Insert a role permission into a database.
*/
createRolePermission(role: string, permission: string, resultHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>) : JDBCUserUtil;
}

7

index.js

@@ -20,7 +20,10 @@ /*

/**
* @typedef { import("es4x") } Java
* @typedef { import("@vertx/core") } Java
*/
module.exports = {
JDBCAuth: Java.type('io.vertx.ext.auth.jdbc.JDBCAuth'),
JDBCHashStrategy: Java.type('io.vertx.ext.auth.jdbc.JDBCHashStrategy')
JDBCAuthentication: Java.type('io.vertx.ext.auth.jdbc.JDBCAuthentication'),
JDBCAuthorization: Java.type('io.vertx.ext.auth.jdbc.JDBCAuthorization'),
JDBCHashStrategy: Java.type('io.vertx.ext.auth.jdbc.JDBCHashStrategy'),
JDBCUserUtil: Java.type('io.vertx.ext.auth.jdbc.JDBCUserUtil')
};

@@ -97,1 +97,59 @@ /*

}
/**
* Options configuring JDBC authentication.
*/
export class JDBCAuthenticationOptions {
constructor();
constructor(obj: JDBCAuthenticationOptions);
/**
* Set the authentication query to use. Use this if you want to override the
* default authentication query.
*/
getAuthenticationQuery(): string;
/**
* Set the authentication query to use. Use this if you want to override the
* default authentication query.
*/
setAuthenticationQuery(authenticationQuery: string): JDBCAuthenticationOptions;
}
/**
* Options configuring JDBC authentication.
*/
export class JDBCAuthorizationOptions {
constructor();
constructor(obj: JDBCAuthorizationOptions);
/**
* Set the permissions query to use. Use this if you want to override the
* default permissions query.
*/
getPermissionsQuery(): string;
/**
* Set the permissions query to use. Use this if you want to override the
* default permissions query.
*/
setPermissionsQuery(permissionsQuery: string): JDBCAuthorizationOptions;
/**
* Set the roles query to use. Use this if you want to override the default
* roles query.
*/
getRolesQuery(): string;
/**
* Set the roles query to use. Use this if you want to override the default
* roles query.
*/
setRolesQuery(rolesQuery: string): JDBCAuthorizationOptions;
}

@@ -20,6 +20,8 @@ /*

/**
* @typedef { import("es4x") } Java
* @typedef { import("@vertx/core") } Java
*/
module.exports = {
JDBCAuthOptions: Java.type('io.vertx.ext.auth.jdbc.JDBCAuthOptions')
JDBCAuthOptions: Java.type('io.vertx.ext.auth.jdbc.JDBCAuthOptions'),
JDBCAuthenticationOptions: Java.type('io.vertx.ext.auth.jdbc.JDBCAuthenticationOptions'),
JDBCAuthorizationOptions: Java.type('io.vertx.ext.auth.jdbc.JDBCAuthorizationOptions')
};
{
"name" : "@vertx/auth-jdbc",
"description" : "Generated Eclipse Vert.x bindings for 'vertx-auth-jdbc'",
"version" : "3.9.4",
"version" : "4.0.0-CR1",
"license" : "Apache-2.0",

@@ -10,9 +10,8 @@ "public" : true,

"artifactId" : "vertx-auth-jdbc",
"version" : "3.9.4"
"version" : "4.0.0.CR1"
},
"dependencies" : {
"@vertx/core" : "3.9.4",
"@vertx/auth-common" : "3.9.4",
"@vertx/jdbc-client" : "3.9.4",
"@vertx/sql-common" : "3.9.4"
"@vertx/core" : "4.0.0-CR1",
"@vertx/auth-common" : "4.0.0-CR1",
"@vertx/jdbc-client" : "4.0.0-CR1"
},

@@ -22,2 +21,7 @@ "main" : "index.js",

"types" : "index.d.ts",
"exports" : {
"." : "./index.mjs",
"./index" : "./index.mjs",
"./options" : "./options.mjs"
},
"sideEffects" : false,

@@ -24,0 +28,0 @@ "repository" : {

![npm (scoped)](https://img.shields.io/npm/v/@vertx/auth-jdbc.svg)
![npm](https://img.shields.io/npm/l/@vertx/auth-jdbc.svg)
![Security Status](https://snyk-widget.herokuapp.com/badge/npm/@vertx/auth-jdbc.svg)
![Security Status](https://snyk-widget.herokuapp.com/badge/npm/%40vertx%2Fauth-jdbc/badge.svg)

@@ -5,0 +5,0 @@ Generated JavaScript bindings for Eclipse Vert.x.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc