Package org.mozilla.geckoview
Class GeckoSession.PromptDelegate.AuthPrompt
Object
org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
org.mozilla.geckoview.GeckoSession.PromptDelegate.AuthPrompt
- Enclosing interface:
- GeckoSession.PromptDelegate
public static class GeckoSession.PromptDelegate.AuthPrompt
extends GeckoSession.PromptDelegate.BasePrompt
AuthPrompt contains the information necessary to represent an HTML authorization prompt
generated by content.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDefines available authentication options and their flags for authorization prompts.Nested classes/interfaces inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
GeckoSession.PromptDelegate.BasePrompt.Observer -
Field Summary
FieldsModifier and TypeFieldDescriptionTheGeckoSession.PromptDelegate.AuthPrompt.AuthOptionsthat describe the type of authorization prompt.final StringThe message to be displayed with this prompt; may be null.Fields inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
title -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAuthPrompt(String id, String title, String message, GeckoSession.PromptDelegate.AuthPrompt.AuthOptions authOptions, GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructs an AuthPrompt for HTTP authentication requests. -
Method Summary
Modifier and TypeMethodDescriptionConfirms this prompt with just a password, returning the password to content.Confirms this prompt with a username and password, returning both to content.Methods inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
confirm, dismiss, getDelegate, isComplete, setDelegate
-
Field Details
-
message
The message to be displayed with this prompt; may be null. -
authOptions
TheGeckoSession.PromptDelegate.AuthPrompt.AuthOptionsthat describe the type of authorization prompt.
-
-
Constructor Details
-
AuthPrompt
protected AuthPrompt(@NonNull String id, @Nullable String title, @Nullable String message, @NonNull GeckoSession.PromptDelegate.AuthPrompt.AuthOptions authOptions, @NonNull GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructs an AuthPrompt for HTTP authentication requests.- Parameters:
id- the unique identifier for this prompttitle- optional title text for the prompt; may be nullmessage- the message to display; may be nullauthOptions- the AuthOptions describing flags, URI, and encryption levelobserver- the observer to notify when the prompt is completed
-
-
Method Details
-
confirm
@UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String password) Confirms this prompt with just a password, returning the password to content.- Parameters:
password- A String containing the password input by the user.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponsewhich can be used to complete theGeckoResultassociated with this prompt.
-
confirm
@UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String username, @NonNull String password) Confirms this prompt with a username and password, returning both to content.- Parameters:
username- A String containing the username input by the user.password- A String containing the password input by the user.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponsewhich can be used to complete theGeckoResultassociated with this prompt.
-