Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vertx/auth-common

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-common - npm Package Compare versions

Comparing version 3.5.4 to 3.6.0

enums.d.ts

140

index.d.ts

@@ -1,7 +0,22 @@

import { AsyncResult } from '@vertx/core';
/*
* Copyright 2018 ES4X
*
* ES4X licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
import { Handler, AsyncResult } from '@vertx/core';
export class AuthProvider {
export abstract class AuthProvider {
/**
* Authenticate a user.
* Authenticate a user.
* <p>

@@ -25,10 +40,8 @@ * The first argument is a JSON object containing information for authenticating the user. What this actually contains

*/
authenticate(authInfo: object, resultHandler: (result: AsyncResult<User>) => void) : void;
authenticate(authInfo: { [key: string]: any }, resultHandler: (res: AsyncResult<User>) => void | Handler<AsyncResult<User>>) : void;
}
export class ChainAuth {
export abstract class ChainAuth extends AuthProvider {
/**
* Create a Chainable Auth Provider auth provider
* Create a Chainable Auth Provider auth provider
* @return the auth provider

@@ -40,3 +53,3 @@ *

/**
* Appends a auth provider to the chain.
* Appends a auth provider to the chain.
* @param other auth provider

@@ -49,3 +62,3 @@ * @return self

/**
* Removes a provider from the chain.
* Removes a provider from the chain.
* @param other provider to remove

@@ -58,13 +71,81 @@ * @return true if provider was removed, false if non existent in the chain.

/**
* Clears the chain.
* Clears the chain.
*
*/
clear() : void;
}
export abstract class HashingAlgorithm {
/**
* return the symbolic name for the algorithm
* @return short id e.g.: sha512.
*
*/
id() : string;
/**
* return the list of param names required for this algorithm.
* @return set of param names.
*
*/
params() : string[];
/**
* Should the encoded string use the default separator to split fields.
* @return true by default.
*
*/
needsSeparator() : boolean;
}
export abstract class HashingStrategy {
/**
* Factory method to load the algorithms from the system
* @return a Hashing Strategy capable of hashing using the available algorithms
*
*/
static load() : HashingStrategy;
export class User {
/**
* Is the user authorised to
* Hashes a password.
* @param id the algorithm id
* @param params the algorithm specific paramters
* @param salt the given salt
* @param password the given password
* @return the hashed string
*
*/
hash(id: string, params: { [key: string]: string; }, salt: string, password: string) : string;
/**
* Time constant password check. Regardless of the check, this algorithm executes the same number of
* checks regardless of the correctly number of characters
* @param hash the hash to verify
* @param password the password to test against
* @return boolean
*
*/
verify(hash: string, password: string) : boolean;
/**
* Get an algorithm interface by its Id
* @param id the algorithm id
* @return the algorithm
*
*/
get(id: string) : HashingAlgorithm;
/**
* Put or replace an algorithm into the list of system loaded algorithms.
* @param id the algorithm id
* @param algorithm the implementation
* @return self
*
*/
put(id: string, algorithm: HashingAlgorithm) : HashingStrategy;
}
export abstract class User {
/**
* Is the user authorised to
* @param authority the authority - what this really means is determined by the specific implementation. It might

@@ -78,13 +159,13 @@ * represent a permission to access a resource e.g. `printers:printer34` or it might represent

*/
isAuthorized(authority: string, resultHandler: (result: AsyncResult<boolean>) => void) : User;
isAuthorized(authority: string, resultHandler: (res: AsyncResult<boolean>) => void | Handler<AsyncResult<boolean>>) : User;
/**
*
*
* @deprecated See {@link #isAuthorized(String, Handler)}
*
*/
isAuthorised(authority: string, resultHandler: (result: AsyncResult<boolean>) => void) : User;
isAuthorised(authority: string, resultHandler: (res: AsyncResult<boolean>) => void | Handler<AsyncResult<boolean>>) : User;
/**
* The User object will cache any authorities that it knows it has to avoid hitting the
* The User object will cache any authorities that it knows it has to avoid hitting the
* underlying auth provider each time. Use this method if you want to clear this cache.

@@ -97,3 +178,3 @@ * @return the User to enable fluent use

/**
* Get the underlying principal for the User. What this actually returns depends on the implementation.
* Get the underlying principal for the User. What this actually returns depends on the implementation.
* For a simple user/password based auth, it's likely to contain a JSON object with the following structure:

@@ -108,6 +189,6 @@ * <pre>

*/
principal() : object;
principal() : { [key: string]: any };
/**
* Set the auth provider for the User. This is typically used to reattach a detached User with an AuthProvider, e.g.
* Set the auth provider for the User. This is typically used to reattach a detached User with an AuthProvider, e.g.
* after it has been deserialized.

@@ -118,3 +199,2 @@ * @param authProvider the AuthProvider - this must be the same type of AuthProvider that originally created the User

setAuthProvider(authProvider: AuthProvider) : void;
}

@@ -124,5 +204,5 @@

export class VertxContextPRNG {
export abstract class VertxContextPRNG {
/**
* Get or create a secure non blocking random number generator using the current vert.x context. If there is no
* Get or create a secure non blocking random number generator using the current vert.x context. If there is no
* current context (i.e.: not running on the eventloop) then a {@link java.lang.IllegalStateException} is thrown.

@@ -136,3 +216,3 @@ * @return A secure non blocking random number generator.

/**
* Get or create a secure non blocking random number generator using the current vert.x instance. Since the context
* Get or create a secure non blocking random number generator using the current vert.x instance. Since the context
* might be different this method will attempt to use the current context first if available and then fall back to

@@ -147,3 +227,3 @@ * create a new instance of the PRNG.

/**
* Returns a Base64 mime encoded String of random data with the given length. The length parameter refers to the length
* Returns a Base64 mime encoded String of random data with the given length. The length parameter refers to the length
* of the String before the encoding step.

@@ -157,3 +237,3 @@ * @param length the desired string length before Base64 encoding.

/**
* Returns a secure random int
* Returns a secure random int
* @return random int.

@@ -164,3 +244,9 @@ *

/**
* Returns a secure random int, between 0 (inclusive) and the specified bound (exclusive).
* @param bound the upper bound (exclusive), which must be positive.
* @return random int.
*
*/
nextInt(bound: number) : number;
}

@@ -0,1 +1,17 @@

/*
* Copyright 2018 ES4X
*
* ES4X licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
/// <reference types="@vertx/auth-common" />

@@ -5,4 +21,6 @@ module.exports = {

ChainAuth: Java.type('io.vertx.ext.auth.ChainAuth'),
HashingAlgorithm: Java.type('io.vertx.ext.auth.HashingAlgorithm'),
HashingStrategy: Java.type('io.vertx.ext.auth.HashingStrategy'),
User: Java.type('io.vertx.ext.auth.User'),
VertxContextPRNG: Java.type('io.vertx.ext.auth.VertxContextPRNG')
};

70

options.d.ts

@@ -0,36 +1,76 @@

/*
* Copyright 2018 ES4X
*
* ES4X licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
export interface AuthOptions {
export abstract class AuthOptions {
constructor();
constructor(obj: AuthOptions);
}
export class KeyStoreOptions {
password: string;
constructor();
constructor(obj: KeyStoreOptions);
getPassword(): string;
path: string;
setPassword(password: string): KeyStoreOptions;
type: string;
getPath(): string;
setPath(path: string): KeyStoreOptions;
getType(): string;
setType(type: string): KeyStoreOptions;
}
export class PubSecKeyOptions {
algorithm: string;
constructor();
constructor(obj: PubSecKeyOptions);
getAlgorithm(): string;
certificate: boolean;
setAlgorithm(algorithm: string): PubSecKeyOptions;
publicKey: string;
isCertificate(): boolean;
secretKey: string;
setCertificate(certificate: boolean): PubSecKeyOptions;
symmetric: boolean;
getPublicKey(): string;
setPublicKey(publicKey: string): PubSecKeyOptions;
getSecretKey(): string;
setSecretKey(secretKey: string): PubSecKeyOptions;
isSymmetric(): boolean;
setSymmetric(symmetric: boolean): PubSecKeyOptions;
}
export class SecretOptions {
secret: string;
constructor();
constructor(obj: SecretOptions);
getSecret(): string;
type: string;
setSecret(secret: string): SecretOptions;
getType(): string;
setType(type: string): SecretOptions;
}

@@ -0,3 +1,20 @@

/*
* Copyright 2018 ES4X
*
* ES4X licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
/// <reference types="@vertx/auth-common/options" />
module.exports = {
AuthOptions: Java.type('io.vertx.ext.auth.AuthOptions'),
KeyStoreOptions: Java.type('io.vertx.ext.auth.KeyStoreOptions'),

@@ -4,0 +21,0 @@ PubSecKeyOptions: Java.type('io.vertx.ext.auth.PubSecKeyOptions'),

{
"name" : "@vertx/auth-common",
"description" : "Generated Eclipse Vert.x bindings for 'vertx-auth-common'",
"version" : "3.5.4",
"license" : "Apache Software License 2.0",
"version" : "3.6.0",
"license" : "Apache License 2.0",
"public" : true,

@@ -10,9 +10,10 @@ "maven" : {

"artifactId" : "vertx-auth-common",
"version" : "3.5.4"
"version" : "3.6.0"
},
"dependencies" : {
"@vertx/core" : "3.5.3"
"@vertx/core" : "3.6.0"
},
"main" : "index.js",
"types" : "index.d.ts"
}
"types" : "index.d.ts",
"sideEffects" : false
}
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