1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 18:23:31 +00:00
Files
browser/libs/vault/src/cipher-form/abstractions/cipher-form-generation.service.ts
albertboyd5 ca41ecba29 [PM-16171] Simplelogin alias generation only generate random words instead the domain name (#13024)
* Exposes URI property from the cipher form.
* Updates credential generator to accept the URI using a `website` attribute

---------

Co-authored-by:  Audrey  <audrey@audreyality.com>
2025-02-20 11:33:40 -05:00

16 lines
559 B
TypeScript

/**
* Service responsible for generating random passwords and usernames.
*/
export abstract class CipherFormGenerationService {
/**
* Generates a random password. Called when the user clicks the "Generate Password" button in the UI.
*/
abstract generatePassword(): Promise<string | null>;
/**
* Generates a random username. Called when the user clicks the "Generate Username" button in the UI.
* @param uri The URI associated with the username generation request.
*/
abstract generateUsername(uri: string): Promise<string | null>;
}