Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Authorization.cs / 1 / Authorization.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Net {
///
/// Used for handling and completing a custom authorization.
///
public class Authorization {
private string m_Message;
private bool m_Complete;
private string[] m_ProtectionRealm;
private string m_ConnectionGroupId;
private bool m_MutualAuth;
///
///
/// Creates a new instance of the class with the specified
/// authorization token.
///
///
public Authorization(string token) {
m_Message = ValidationHelper.MakeStringNull(token);
m_Complete = true;
}
///
///
/// Creates a new instance of the class with the specified
/// authorization token and completion status.
///
///
public Authorization(string token, bool finished) {
m_Message = ValidationHelper.MakeStringNull(token);
m_Complete = finished;
}
///
///
/// Creates a new instance of the class with the specified
/// authorization token, completion status, and connection m_ConnectionGroupId identifier.
///
///
public Authorization(string token, bool finished, string connectionGroupId): this(token, finished, connectionGroupId, false) {
}
//
internal Authorization(string token, bool finished, string connectionGroupId, bool mutualAuth) {
m_Message = ValidationHelper.MakeStringNull(token);
m_ConnectionGroupId = ValidationHelper.MakeStringNull(connectionGroupId);
m_Complete = finished;
m_MutualAuth = mutualAuth;
}
///
/// Gets
/// the response returned to the server in response to an authentication
/// challenge.
///
public string Message {
get { return m_Message;}
}
// used to specify if this Authorization needs a special private server connection,
// identified by this string
///
/// [To be supplied.]
///
public string ConnectionGroupId {
get { return m_ConnectionGroupId; }
}
///
/// Gets the completion status of the authorization.
///
public bool Complete {
get { return m_Complete;}
}
internal void SetComplete(bool complete) {
m_Complete = complete;
}
///
/// Gets or sets the prefix for Uris that can be authenticated with the property.
///
public string[] ProtectionRealm {
get { return m_ProtectionRealm;}
set {
string[] newValue = ValidationHelper.MakeEmptyArrayNull(value);
m_ProtectionRealm = newValue;
}
}
//
//
public bool MutuallyAuthenticated {
get {
return Complete && m_MutualAuth;
}
set {
m_MutualAuth = value;
}
}
} // class Authorization
} // namespace System.Net
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OleDbConnectionPoolGroupProviderInfo.cs
- WebExceptionStatus.cs
- CommandID.cs
- PeerContact.cs
- WebResourceAttribute.cs
- SystemBrushes.cs
- SecureStringHasher.cs
- WizardDesigner.cs
- XmlSchemaComplexContentRestriction.cs
- PathBox.cs
- ResXBuildProvider.cs
- ExeContext.cs
- TargetParameterCountException.cs
- SocketSettings.cs
- Win32.cs
- Renderer.cs
- CorrelationTokenInvalidatedHandler.cs
- TdsParserHelperClasses.cs
- ClassData.cs
- ScriptingProfileServiceSection.cs
- ProtocolException.cs
- EntityDesignerDataSourceView.cs
- TreeNodeStyleCollection.cs
- CacheVirtualItemsEvent.cs
- ProxyWebPart.cs
- ClientCultureInfo.cs
- LogArchiveSnapshot.cs
- TTSEvent.cs
- InstanceKeyNotReadyException.cs
- BindingGroup.cs
- RemoveStoryboard.cs
- GuidelineSet.cs
- Attachment.cs
- OnOperation.cs
- StateChangeEvent.cs
- ObjectNavigationPropertyMapping.cs
- EventHandlersDesigner.cs
- ConcurrencyBehavior.cs
- TouchesCapturedWithinProperty.cs
- HybridCollection.cs
- EnterpriseServicesHelper.cs
- MDIWindowDialog.cs
- GroupBoxAutomationPeer.cs
- Vertex.cs
- OleDbErrorCollection.cs
- oledbconnectionstring.cs
- RegistrySecurity.cs
- BaseCAMarshaler.cs
- SubtreeProcessor.cs
- SqlStream.cs
- _BaseOverlappedAsyncResult.cs
- CalendarBlackoutDatesCollection.cs
- TlsnegoTokenAuthenticator.cs
- SendingRequestEventArgs.cs
- MinimizableAttributeTypeConverter.cs
- Signature.cs
- infer.cs
- CommentGlyph.cs
- QuadraticBezierSegment.cs
- CollaborationHelperFunctions.cs
- DateTimePicker.cs
- BinaryObjectReader.cs
- BinaryCommonClasses.cs
- XmlCharType.cs
- ColorAnimationUsingKeyFrames.cs
- DynamicPropertyReader.cs
- EventPrivateKey.cs
- SmtpMail.cs
- GridViewSortEventArgs.cs
- ListControl.cs
- StringSorter.cs
- XPathMessageFilterTable.cs
- QilParameter.cs
- AddressingVersion.cs
- ObjectDataSourceSelectingEventArgs.cs
- ApplicationSettingsBase.cs
- ProfilePropertySettings.cs
- DataFormats.cs
- MonthChangedEventArgs.cs
- _DomainName.cs
- InternalConfigSettingsFactory.cs
- Emitter.cs
- ReflectionTypeLoadException.cs
- XmlNotation.cs
- IArgumentProvider.cs
- CompilerCollection.cs
- HttpInputStream.cs
- SecurityIdentifierConverter.cs
- ScrollViewerAutomationPeer.cs
- CatalogZone.cs
- DataObjectAttribute.cs
- RenderDataDrawingContext.cs
- ListBoxItemAutomationPeer.cs
- InputElement.cs
- FloaterBaseParaClient.cs
- UIElementParagraph.cs
- NativeMethods.cs
- MemoryRecordBuffer.cs
- TreeViewImageIndexConverter.cs
- HelpProvider.cs