csrf: Fix lint (#20805)

This commit is contained in:
Andy
2017-10-23 07:52:59 -07:00
committed by GitHub
parent 9a1c802a89
commit 85c11ed454
+3 -20
View File
@@ -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;
}