tw5-typed / utils/PasswordPrompt / PasswordPrompt
Class: PasswordPrompt
utils/PasswordPrompt.PasswordPrompt
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new PasswordPrompt(): PasswordPrompt
Creates a PasswordPrompt object
Returns
Defined in
src/utils/PasswordPrompt.d.ts:23
Properties
passwordPrompts
• passwordPrompts: PasswordPromptInfo
[]
Store of pending password prompts
Defined in
src/utils/PasswordPrompt.d.ts:19
promptWrapper
• promptWrapper: Element
Defined in
src/utils/PasswordPrompt.d.ts:21
Methods
createPrompt
▸ createPrompt(options
): PasswordPromptInfo
Adds a new password prompt. Options are:
Parameters
Name | Type | Description |
---|---|---|
options | Object | Options are: * submitText: text to use for submit button (defaults to "Login") * serviceName: text of the human readable service name * noUserName: set true to disable username prompt * canCancel: set true to enable a cancel button (callback called with null) * repeatPassword: set true to prompt for the password twice * callback: function to be called on submission with parameter of object {username,password} . Callback must return true to remove the password prompt |
options.callback | PasswordPromptInfoCallback | - |
options.canCancel | boolean | - |
options.noUserName | boolean | - |
options.repeatPassword | boolean | - |
options.serviceName | string | - |
options.submitText | string | - |
Returns
Memberof
PasswordPrompt
Defined in
src/utils/PasswordPrompt.d.ts:45
removePrompt
▸ removePrompt(promptInfo
): void
Parameters
Name | Type |
---|---|
promptInfo | PasswordPromptInfo |
Returns
void
Defined in
src/utils/PasswordPrompt.d.ts:53
setWrapperDisplay
▸ setWrapperDisplay(): void
Hides or shows the wrapper depending on whether there are any outstanding prompts
Returns
void