public class Authorization
Object
Authorization
System
Networking
Supplies authentication messages used to authenticate a client to server.
The Authorization class contains authentication information returned by a IAuthenticationModule module. Authorization instances are used to pass server challenge responses and client preauthentication information.[Note: Applications do not create or access instances of this type directly; instances of this type are created by authentication modules and used by the AuthenticationManager.]
System.Net Namespace
Authorization Constructors
Authorization(System.String) Constructor
Authorization(System.String, bool) Constructor
Authorization(System.String, bool, System.String) Constructor
Authorization Properties
Authorization.Complete Property
Authorization.ConnectionGroupId Property
Authorization.Message Property
Authorization.ProtectionRealm Property
public Authorization(string token);
Constructs and initializes a new instance of the Authorization class with the specified authorization message.
- token
- A String containing the authorization message to be sent to the server.
This constructor creates a Authorization instance with the System.Net.Authorization.Message property set to token and the System.Net.Authorization.Complete property set totrue
. If token isnull
or a zero-length string, System.Net.Authorization.Message is set tonull
. System.Net.Authorization.ConnectionGroupId is set tonull
.[Note: The System.Net.Authorization.Complete property indicates whether the authentication, as defined by the authentication protocol implemented by the caller, is finished or requires additional information exchange between the client and server.]
System.Net.Authorization Class, System.Net Namespace
public Authorization(string token, bool finished);
Constructs and initializes a new instance of the Authorization class with the specified authorization message and completion status.
- token
- A String containing the authentication message to be sent to the server.
- finished
- A Boolean value indicating the completion status of the client authentication. Specify
true
if the authentication is complete; otherwise,false
.
This constructor creates a Authorization instance with the System.Net.Authorization.Message property set to token and the System.Net.Authorization.Complete property set to finished. If token isnull
or a zero-length string, System.Net.Authorization.Message is set tonull
. System.Net.Authorization.ConnectionGroupId is set tonull
.[Note: The System.Net.Authorization.Complete property indicates whether the authentication, as defined by the authentication protocol implemented by the caller, is finished or requires additional information exchange between the client and server.]
System.Net.Authorization Class, System.Net Namespace
public Authorization(string token, bool finished, string connectionGroupId);
Constructs and initializes a new instance of the Authorization class with the specified authorization message, completion status, and connection group identifier.
- token
- A String containing the authentication message to be sent to the server.
- finished
- A Boolean value indicating the completion status of the authentication. Specify
true
if the authentication is complete; otherwise,false
.- connectionGroupId
- A String containing a unique identifier that will be used to identify the authenticated connection, or
null
.
This constructor creates a Authorization instance with the System.Net.Authorization.Message property set to token, the System.Net.Authorization.Complete property set to finished, and the System.Net.Authorization.ConnectionGroupId property set to connectionGroupId. If token isnull
or a zero-length string, System.Net.Authorization.Message is set tonull
. If connectionGroupId isnull
or a zero-length string, System.Net.Authorization.ConnectionGroupId is set tonull
.[Note: The connection group identifier is used to restrict access to the server connection established with the current authorization instance. Only WebRequest instances that have connectionGroupId as their System.Net.WebRequest.ConnectionGroupName property value can use the connection. The connection group information set by this constructor is also available in the System.Net.ServicePoint.ConnectionName property of the service point that represents the connection.
The System.Net.Authorization.Complete property indicates whether the authentication, as defined by the authentication protocol implemented by the caller, is finished or requires additional information exchange between the client and server.
]
System.Net.Authorization Class, System.Net Namespace
public bool Complete { get; }
Gets a Boolean value indicating the completion status of the authentication.
true
if the authentication process is complete; otherwise,false
.
This property is read-only.The System.Net.Authorization.Complete property is set to
true
when the authentication process between the client and the server is finished.[Note: Some authentication modules, such as a Kerberos module, use multiple round trips between the client and server to complete an authentication. The authentication module sets the System.Net.Authorization.Complete property to
false
until the authentication is complete.]
System.Net.Authorization Class, System.Net Namespace
public string ConnectionGroupId { get; }
Gets the unique identifier for an authenticated connection.
A String containing a unique connection identifier, ornull
if no value was specified to the constructor for the current instance.
This property is read-only.The connection group identifier is used to restrict access to the server connection established with the current authorization instance.
[Note: Only WebRequest instances that have System.Net.Authorization.ConnectionGroupId as their System.Net.WebRequest.ConnectionGroupName property value can use the connection. If the value of this property is
null
, access to the connection is not restricted in this manner. The connection group information is also available in the System.Net.ServicePoint.ConnectionName property of the service point that represents the connection.]
System.Net.Authorization Class, System.Net Namespace
public string Message { get; }
Gets the response to an authentication challenge.
A String containing the message that will be returned to the server in response to an authentication challenge.
This property is read-only.[Note: The content of the string returned by this property is determined by the protocol implemented by the IAuthenticationModule object that created the current instance. ]
System.Net.Authorization Class, System.Net Namespace
public string[] ProtectionRealm { get; set; }
Gets or sets the URIs that can be authenticated using the value in the System.Net.Authorization.Message property.
A String array containing URIs.
[Note: A WebRequest compares a URI to this list to determine if the current instance can be used to authenticate a request for a given URI.]
System.Net.Authorization Class, System.Net Namespace