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.8.3 to 3.8.4

168

index.d.ts

@@ -21,26 +21,21 @@ /*

*
* User-facing interface for authenticating users.
* @author <a href="http://tfox.org">Tim Fox</a>
*
*/
* User-facing interface for authenticating users.
*/
export abstract class AuthProvider {
/**
* Authenticate a user.
* <p>
* The first argument is a JSON object containing information for authenticating the user. What this actually contains
* depends on the specific implementation. In the case of a simple username/password based
* authentication it is likely to contain a JSON object with the following structure:
* <pre>
* {
* "username": "tim",
* "password": "mypassword"
* }
* </pre>
* For other types of authentication it contain different information - for example a JWT token or OAuth bearer token.
* <p>
* If the user is successfully authenticated a {@link User} object is passed to the handler in an {@link io.vertx.core.AsyncResult}.
* The user object can then be used for authorisation.
* @param authInfo The auth information
* @param resultHandler The result handler
*
* <p>
* The first argument is a JSON object containing information for authenticating the user. What this actually contains
* depends on the specific implementation. In the case of a simple username/password based
* authentication it is likely to contain a JSON object with the following structure:
* <pre>
* {
* "username": "tim",
* "password": "mypassword"
* }
* </pre>
* For other types of authentication it contain different information - for example a JWT token or OAuth bearer token.
* <p>
* If the user is successfully authenticated a {@link User} object is passed to the handler in an {@link AsyncResult}.
* The user object can then be used for authorisation.
*/

@@ -52,10 +47,7 @@ authenticate(authInfo: { [key: string]: any }, resultHandler: ((res: AsyncResult<User>) => void) | Handler<AsyncResult<User>>) : void;

* Chain several auth providers as if they were one. This is useful for cases where one want to authenticate across
* several providers, for example, database and fallback to passwd file.
*
*/
* several providers, for example, database and fallback to passwd file.
*/
export abstract class ChainAuth extends AuthProvider {
/**
* Create a Chainable Auth Provider auth provider
* @return the auth provider
*
*/

@@ -66,5 +58,2 @@ static create() : ChainAuth;

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

@@ -75,5 +64,2 @@ append(other: AuthProvider) : ChainAuth;

* Removes a provider from the chain.
* @param other provider to remove
* @return true if provider was removed, false if non existent in the chain.
*
*/

@@ -84,3 +70,2 @@ remove(other: AuthProvider) : boolean;

* Clears the chain.
*
*/

@@ -92,10 +77,6 @@ clear() : void;

* Hashing Algorithm. A common interface to interact with any system provided algorithms.
* @author <a href="mailto:plopes@redhat.com">Paulo Lopes</a>
*
*/
*/
export abstract class HashingAlgorithm {
/**
* return the symbolic name for the algorithm
* @return short id e.g.: sha512.
*
*/

@@ -106,4 +87,2 @@ id() : string;

* return the list of param names required for this algorithm.
* @return set of param names.
*
*/

@@ -114,4 +93,2 @@ params() : string[];

* Should the encoded string use the default separator to split fields.
* @return true by default.
*
*/

@@ -123,12 +100,8 @@ needsSeparator() : boolean;

* Hashing Strategy manager.
*
* This class will load system provided hashing strategies and algorithms.
* @author <a href="mailto:plopes@redhat.com">Paulo Lopes</a>
*
*/
*
* This class will load system provided hashing strategies and algorithms.
*/
export abstract class HashingStrategy {
/**
* Factory method to load the algorithms from the system
* @return a Hashing Strategy capable of hashing using the available algorithms
*
*/

@@ -139,8 +112,2 @@ static load() : HashingStrategy;

* 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
*
*/

@@ -151,7 +118,3 @@ 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
*
* checks regardless of the correctly number of characters
*/

@@ -162,5 +125,2 @@ verify(hash: string, password: string) : boolean;

* Get an algorithm interface by its Id
* @param id the algorithm id
* @return the algorithm
*
*/

@@ -171,6 +131,2 @@ 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
*
*/

@@ -182,17 +138,8 @@ put(id: string, algorithm: HashingAlgorithm) : HashingStrategy;

* Represents an authenticates User and contains operations to authorise the user.
* <p>
* Please consult the documentation for a detailed explanation.
* @author <a href="http://tfox.org">Tim Fox</a>
*
*/
* <p>
* Please consult the documentation for a detailed explanation.
*/
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
* represent a permission to access a resource e.g. `printers:printer34` or it might represent
* authority to a role in a roles based model, e.g. `role:admin`.
* @param resultHandler handler that will be called with an {@link io.vertx.core.AsyncResult} containing the value
* `true` if the they has the authority or `false` otherwise.
* @return the User to enable fluent use
*
*/

@@ -202,5 +149,2 @@ isAuthorized(authority: string, resultHandler: ((res: AsyncResult<boolean>) => void) | Handler<AsyncResult<boolean>>) : User;

/**
*
* @deprecated See {@link #isAuthorized(String, Handler)}
*
*/

@@ -211,5 +155,3 @@ 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
* underlying auth provider each time. Use this method if you want to clear this cache.
* @return the User to enable fluent use
*
* underlying auth provider each time. Use this method if you want to clear this cache.
*/

@@ -220,10 +162,8 @@ clearCache() : User;

* 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:
* <pre>
* {
* "username", "tim"
* }
* </pre>
* @return JSON representation of the Principal
*
* For a simple user/password based auth, it's likely to contain a JSON object with the following structure:
* <pre>
* {
* "username", "tim"
* }
* </pre>
*/

@@ -234,5 +174,3 @@ 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.
* after it has been deserialized.
* @param authProvider the AuthProvider - this must be the same type of AuthProvider that originally created the User
*
* after it has been deserialized.
*/

@@ -246,18 +184,13 @@ setAuthProvider(authProvider: AuthProvider) : void;

* A secure non blocking random number generator isolated to the current context. The PRNG is bound to the vert.x
* context and setup to close when the context shuts down.
* <p>
* When applicable, use of VertxContextPRNG rather than create new PRNG objects is helpful to keep the system entropy
* usage to the minimum avoiding potential blocking across the application.
* <p>
* The use of VertxContextPRNG is particularly appropriate when multiple handlers use random numbers.
* @author <a href="mailto:plopes@redhat.com">Paulo Lopes</a>
*
*/
* context and setup to close when the context shuts down.
* <p>
* When applicable, use of VertxContextPRNG rather than create new PRNG objects is helpful to keep the system entropy
* usage to the minimum avoiding potential blocking across the application.
* <p>
* The use of VertxContextPRNG is particularly appropriate when multiple handlers use random numbers.
*/
export abstract class VertxContextPRNG {
/**
* 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.
* @return A secure non blocking random number generator.
* @throws IllegalStateException when there is no context available.
*
* current context (i.e.: not running on the eventloop) then a IllegalStateException is thrown.
*/

@@ -268,7 +201,4 @@ static current() : VertxContextPRNG;

* 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
* create a new instance of the PRNG.
* @param vertx a Vert.x instance.
* @return A secure non blocking random number generator.
*
* might be different this method will attempt to use the current context first if available and then fall back to
* create a new instance of the PRNG.
*/

@@ -279,6 +209,3 @@ static current(vertx: Vertx) : VertxContextPRNG;

* 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.
* @param length the desired string length before Base64 encoding.
* @return A base 64 encoded string.
*
* of the String before the encoding step.
*/

@@ -289,4 +216,2 @@ nextString(length: number) : string;

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

@@ -297,7 +222,4 @@ nextInt() : number;

* 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;
}

@@ -19,5 +19,3 @@ /*

* A common base object for authentication options.<p>
* @author <a href="mailto:julien@julienviet.com">Julien Viet</a>
*
*/
*/
export abstract class AuthOptions {

@@ -31,6 +29,3 @@

* Options describing how an JWT KeyStore should behave.
* @deprecated Keystores are very opinionated and do not properly represent a correct key, please use PEM files or JWKs
* @author <a href="mailto:plopes@redhat.com">Paulo Lopes</a>
*
*/
*/
export class KeyStoreOptions {

@@ -55,5 +50,3 @@

* Options describing how a Cryptographic Key.
* @author <a href="mailto:plopes@redhat.com">Paulo Lopes</a>
*
*/
*/
export class PubSecKeyOptions {

@@ -86,5 +79,3 @@

* Options describing a secret.
* @author <a href="mailto:marco@viafoura.com">Marco Monaco</a>
*
*/
*/
export class SecretOptions {

@@ -91,0 +82,0 @@

{
"name" : "@vertx/auth-common",
"description" : "Generated Eclipse Vert.x bindings for 'vertx-auth-common'",
"version" : "3.8.3",
"version" : "3.8.4",
"license" : "Apache-2.0",

@@ -10,6 +10,6 @@ "public" : true,

"artifactId" : "vertx-auth-common",
"version" : "3.8.3"
"version" : "3.8.4"
},
"dependencies" : {
"@vertx/core" : "3.8.3"
"@vertx/core" : "3.8.4"
},

@@ -16,0 +16,0 @@ "main" : "index.js",

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