mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
csrf: Fix lint (#20805)
This commit is contained in:
Vendored
+3
-20
@@ -17,44 +17,27 @@ interface TokensOptions {
|
||||
}
|
||||
|
||||
declare class Tokens {
|
||||
/**
|
||||
* Token generation/verification class.
|
||||
*
|
||||
* @param {object} [options]
|
||||
* @param {number} [options.saltLength=8] The string length of the salt
|
||||
* @param {number} [options.secretLength=18] The byte length of the secret key
|
||||
* @public
|
||||
*/
|
||||
/** Token generation/verification class. */
|
||||
constructor(options?: TokensOptions)
|
||||
|
||||
/**
|
||||
* Create a new CSRF token.
|
||||
*
|
||||
* @param {string} secret The secret for the token.
|
||||
* @public
|
||||
* @param secret The secret for the token.
|
||||
*/
|
||||
create(secret: string): string;
|
||||
|
||||
/**
|
||||
* Create a new secret key.
|
||||
*
|
||||
* @param {function} [callback]
|
||||
* @public
|
||||
*/
|
||||
/** Create a new secret key. */
|
||||
secret(callback?: SecretCallback): Promise<string>;
|
||||
|
||||
/**
|
||||
* Create a new secret key synchronously.
|
||||
* @public
|
||||
*/
|
||||
secretSync(): string;
|
||||
|
||||
/**
|
||||
* Verify if a given token is valid for a given secret.
|
||||
*
|
||||
* @param {string} secret
|
||||
* @param {string} token
|
||||
* @public
|
||||
*/
|
||||
verify(secret: string, token: string): boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user