Sdílet prostřednictvím


Authenticator.RequestPasswordAuthentication Method

Definition

Overloads

RequestPasswordAuthentication(InetAddress, Int32, String, String, String)

Ask the authenticator that has been registered with the system for a password.

RequestPasswordAuthentication(String, InetAddress, Int32, String, String, String)

Ask the authenticator that has been registered with the system for a password.

RequestPasswordAuthentication(String, InetAddress, Int32, String, String, String, URL, Authenticator+RequestorType)

Ask the authenticator that has been registered with the system for a password.

RequestPasswordAuthentication(InetAddress, Int32, String, String, String)

Ask the authenticator that has been registered with the system for a password.

[Android.Runtime.Register("requestPasswordAuthentication", "(Ljava/net/InetAddress;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/net/PasswordAuthentication;", "")]
public static Java.Net.PasswordAuthentication? RequestPasswordAuthentication (Java.Net.InetAddress? addr, int port, string? protocol, string? prompt, string? scheme);
[<Android.Runtime.Register("requestPasswordAuthentication", "(Ljava/net/InetAddress;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/net/PasswordAuthentication;", "")>]
static member RequestPasswordAuthentication : Java.Net.InetAddress * int * string * string * string -> Java.Net.PasswordAuthentication

Parameters

addr
InetAddress

The InetAddress of the site requesting authorization, or null if not known.

port
Int32

the port for the requested connection

protocol
String

The protocol that's requesting the connection (java.net.Authenticator#getRequestingProtocol())

prompt
String

A prompt string for the user

scheme
String

The authentication scheme

Returns

The username/password, or null if one can't be gotten.

Attributes

Remarks

Ask the authenticator that has been registered with the system for a password.

First, if there is a security manager, its checkPermission method is called with a NetPermission("requestPasswordAuthentication") permission. This may result in a java.lang.SecurityException.

Java documentation for java.net.Authenticator.requestPasswordAuthentication(java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

RequestPasswordAuthentication(String, InetAddress, Int32, String, String, String)

Ask the authenticator that has been registered with the system for a password.

[Android.Runtime.Register("requestPasswordAuthentication", "(Ljava/lang/String;Ljava/net/InetAddress;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/net/PasswordAuthentication;", "")]
public static Java.Net.PasswordAuthentication? RequestPasswordAuthentication (string? host, Java.Net.InetAddress? addr, int port, string? protocol, string? prompt, string? scheme);
[<Android.Runtime.Register("requestPasswordAuthentication", "(Ljava/lang/String;Ljava/net/InetAddress;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/net/PasswordAuthentication;", "")>]
static member RequestPasswordAuthentication : string * Java.Net.InetAddress * int * string * string * string -> Java.Net.PasswordAuthentication

Parameters

host
String

The hostname of the site requesting authentication.

addr
InetAddress

The InetAddress of the site requesting authentication, or null if not known.

port
Int32

the port for the requested connection.

protocol
String

The protocol that's requesting the connection (java.net.Authenticator#getRequestingProtocol())

prompt
String

A prompt string for the user which identifies the authentication realm.

scheme
String

The authentication scheme

Returns

The username/password, or null if one can't be gotten.

Attributes

Remarks

Ask the authenticator that has been registered with the system for a password. This is the preferred method for requesting a password because the hostname can be provided in cases where the InetAddress is not available.

First, if there is a security manager, its checkPermission method is called with a NetPermission("requestPasswordAuthentication") permission. This may result in a java.lang.SecurityException.

Added in 1.4.

Java documentation for java.net.Authenticator.requestPasswordAuthentication(java.lang.String, java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

RequestPasswordAuthentication(String, InetAddress, Int32, String, String, String, URL, Authenticator+RequestorType)

Ask the authenticator that has been registered with the system for a password.

[Android.Runtime.Register("requestPasswordAuthentication", "(Ljava/lang/String;Ljava/net/InetAddress;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/net/URL;Ljava/net/Authenticator$RequestorType;)Ljava/net/PasswordAuthentication;", "")]
public static Java.Net.PasswordAuthentication? RequestPasswordAuthentication (string? host, Java.Net.InetAddress? addr, int port, string? protocol, string? prompt, string? scheme, Java.Net.URL? url, Java.Net.Authenticator.RequestorType? reqType);
[<Android.Runtime.Register("requestPasswordAuthentication", "(Ljava/lang/String;Ljava/net/InetAddress;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/net/URL;Ljava/net/Authenticator$RequestorType;)Ljava/net/PasswordAuthentication;", "")>]
static member RequestPasswordAuthentication : string * Java.Net.InetAddress * int * string * string * string * Java.Net.URL * Java.Net.Authenticator.RequestorType -> Java.Net.PasswordAuthentication

Parameters

host
String

The hostname of the site requesting authentication.

addr
InetAddress

The InetAddress of the site requesting authentication, or null if not known.

port
Int32

the port for the requested connection.

protocol
String

The protocol that's requesting the connection (java.net.Authenticator#getRequestingProtocol())

prompt
String

A prompt string for the user which identifies the authentication realm.

scheme
String

The authentication scheme

url
URL
reqType
Authenticator.RequestorType

requestor type of the connection that requests authentication.

Returns

The username/password, or null if one can't be gotten.

Attributes

Remarks

Java documentation for java.net.Authenticator.requestPasswordAuthentication(java.lang.String, java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to