System.Net.Authorization Class

Assembly: System.dll
Namespace: System.Net
Summary
Contains an authentication message for an Internet server.
C# Syntax:
public class Authorization
Remarks
The AuthenticationManager returns an instance of the Authorization class containing the authentication message that is sent to the Internet server to indicate that the client (such as WebRequest or one of its descendants) is authorized to access the server.

The Authorization instance is created by the authentication module that the AuthenticationManager designates to handle the request.

See also:
System.Net Namespace | IAuthenticationModule

System.Net.Authorization Member List:

Public Constructors
ctor #1 Overloaded:
.ctor(string token)

Creates a new instance of the Authorization class with the specified authorization message.
ctor #2 Overloaded:
.ctor(string token, bool finished)

Creates a new instance of the Authorization class with the specified authorization message and completion status.
ctor #3 Overloaded:
.ctor(string token, bool finished, string connectionGroupId)

Creates a new instance of the Authorization class with the specified authorization message, completion status, and connection group identifier.
Public Properties
Complete Read-only

Gets the completion status of the authorization.
ConnectionGroupId Read-only

Gets a unique identifier for user-specific connections.
Message Read-only

Gets the message returned to the server in response to an authentication challenge.
ProtectionRealm Read-write

Gets or sets the prefix for uniform resource identifiers (URIs) that can be authenticated with the Authorization.Message property.
Public Methods
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Net.Authorization Member Details

Overloaded ctor #1
Summary
Creates a new instance of the Authorization class with the specified authorization message.
C# Syntax:
public Authorization(
   string token
);
Parameters:

token

The encrypted authorization message expected by the server.

Remarks
The Authorization instance is created with the Authorization.Message property set to token and the Authorization.Complete property set to true.

Return to top


Overloaded ctor #2
Summary
Creates a new instance of the Authorization class with the specified authorization message and completion status.
C# Syntax:
public Authorization(
   string token,
   bool finished
);
Parameters:

token

The encrypted authorization message expected by the server .

finished

The completion status of the authorization attempt.true if the authorization attempt is complete; otherwise, false.

Remarks
The Authorization instance is created with the Authorization.Message property set to token and the Authorization.Complete property set to finished.

Return to top


Overloaded ctor #3
Summary
Creates a new instance of the Authorization class with the specified authorization message, completion status, and connection group identifier.
C# Syntax:
public Authorization(
   string token,
   bool finished,
   string connectionGroupId
);
Parameters:

token

The encrypted authorization message expected by the server .

finished

The completion status of the authorization attempt.true if the authorization attempt is complete; otherwise, false.

connectionGroupId

A unique identifier that can be used to create private Client-Server connections, that would only be bound to this authentication scheme.

Return to top


Property: Complete (read-only)
Summary
Gets the completion status of the authorization.
C# Syntax:
public bool Complete {get;}
Remarks
The Authorization.Complete property is set to true when the authentication process between the client and the server is finished. Some authentication modules, such as the Kerberos module, use multiple round trips between the client and server to complete the authentication process. To keep the WebRequest or descendant that initiated the authentication process from interrupting while authorization is taking place, the authentication module sets the Authorization.Complete property to false.
See also:
IAuthenticationModule

Return to top


Property: ConnectionGroupId (read-only)
Summary
Gets a unique identifier for user-specific connections.
C# Syntax:
public string ConnectionGroupId {get;}
Remarks
The Authorization.ConnectionGroupId property is a unique string that associates a connection with a specific authenticating entity. For example, the NTLM authorization module ties the authentication credential information to a specific connection to prevent invalid reuse of the connection.

Return to top


Property: Message (read-only)
Summary
Gets the message returned to the server in response to an authentication challenge.
C# Syntax:
public string Message {get;}
Remarks
The Authorization.Message property contains the authorization string that the client will return to the server when accessing protected resources. The actual contents of the message is defined by the authentication type the client and server are using. Basic HTTP authentication, for example, uses a different message than Kerberos authentication.

When an authentication module supports preauthentication, the Authorization.Message property is sent with the initial request.

See also:
IAuthenticationModule

Return to top


Property: ProtectionRealm (read-write)
Summary
Gets or sets the prefix for uniform resource identifiers (URIs) that can be authenticated with the Authorization.Message property.
C# Syntax:
public string[] ProtectionRealm {get; set;}
Remarks
The Authorization.ProtectionRealm property contains a list of URI prefixes that the Authorization.Message property can be used to authenticate. WebRequest and descendants compare a URI to this list to determine if the Authorization is valid for a particular URI.

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~Authorization();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.