Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Authorization.cs / 1305376 / 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
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UInt64Converter.cs
- DataPagerFieldCollection.cs
- MostlySingletonList.cs
- PrinterUnitConvert.cs
- TextTreeNode.cs
- MimeFormReflector.cs
- XamlToRtfParser.cs
- NaturalLanguageHyphenator.cs
- ClientConfigurationSystem.cs
- Annotation.cs
- ReadOnlyDataSourceView.cs
- NumberFormatInfo.cs
- BookmarkCallbackWrapper.cs
- XmlSchemaComplexContentRestriction.cs
- WindowsProgressbar.cs
- PrimaryKeyTypeConverter.cs
- HelpProvider.cs
- DialogBaseForm.cs
- ObjectViewEntityCollectionData.cs
- UnaryOperationBinder.cs
- WindowProviderWrapper.cs
- StringReader.cs
- PerformanceCounterCategory.cs
- TextTreeObjectNode.cs
- TypeExtension.cs
- PropertyFilterAttribute.cs
- TextBlock.cs
- GenericTypeParameterBuilder.cs
- SafeIUnknown.cs
- hwndwrapper.cs
- ToolStripItemClickedEventArgs.cs
- SharedDp.cs
- SecurityDocument.cs
- PasswordDeriveBytes.cs
- AddInControllerImpl.cs
- Utilities.cs
- BooleanToVisibilityConverter.cs
- RemotingHelper.cs
- LinqDataSourceDisposeEventArgs.cs
- TextTreeTextNode.cs
- BamlLocalizableResource.cs
- PointCollection.cs
- ChannelServices.cs
- TimeSpanStorage.cs
- WorkflowElementDialogWindow.xaml.cs
- SafeNativeMethods.cs
- TextContainerChangedEventArgs.cs
- HostingEnvironmentSection.cs
- Types.cs
- XmlSerializationReader.cs
- DiagnosticsConfigurationHandler.cs
- FileRecordSequenceHelper.cs
- TimeEnumHelper.cs
- RequestTimeoutManager.cs
- ProfilePropertyMetadata.cs
- PreviewPageInfo.cs
- MouseActionValueSerializer.cs
- IODescriptionAttribute.cs
- HttpRequestBase.cs
- DesignerOptionService.cs
- ImageUrlEditor.cs
- XamlGridLengthSerializer.cs
- GridViewCancelEditEventArgs.cs
- HttpConfigurationSystem.cs
- SqlProcedureAttribute.cs
- BitmapCodecInfo.cs
- CellParaClient.cs
- RoleManagerSection.cs
- ThreadStartException.cs
- ProcessThread.cs
- DNS.cs
- RectIndependentAnimationStorage.cs
- SharedUtils.cs
- ServiceContractDetailViewControl.cs
- OptimisticConcurrencyException.cs
- ResetableIterator.cs
- BulletedList.cs
- GeometryCollection.cs
- ChangeDirector.cs
- DataGridViewCell.cs
- ProfileSettings.cs
- ReverseInheritProperty.cs
- DesignTimeSiteMapProvider.cs
- DefinitionProperties.cs
- RightsController.cs
- XamlSerializerUtil.cs
- HttpResponseInternalWrapper.cs
- ConfigXmlReader.cs
- SchemaElementLookUpTable.cs
- AlphaSortedEnumConverter.cs
- ImpersonationContext.cs
- CollectionChangeEventArgs.cs
- TextRangeSerialization.cs
- ApplyTemplatesAction.cs
- ASCIIEncoding.cs
- CharConverter.cs
- Win32PrintDialog.cs
- ExpressionPrefixAttribute.cs
- CatalogZoneBase.cs
- HierarchicalDataTemplate.cs