Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / UserNameSecurityToken.cs / 1305376 / UserNameSecurityToken.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.IdentityModel.Tokens { using System.Collections.ObjectModel; public class UserNameSecurityToken : SecurityToken { string id; string password; string userName; DateTime effectiveTime; public UserNameSecurityToken(string userName, string password) : this(userName, password, SecurityUniqueId.Create().Value) { } public UserNameSecurityToken(string userName, string password, string id) { if (userName == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("userName"); if (userName == string.Empty) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(SR.GetString(SR.UserNameCannotBeEmpty)); this.userName = userName; this.password = password; this.id = id; this.effectiveTime = DateTime.UtcNow; } public override string Id { get { return this.id; } } public override ReadOnlyCollectionSecurityKeys { get { return EmptyReadOnlyCollection .Instance; } } public override DateTime ValidFrom { get { return this.effectiveTime; } } public override DateTime ValidTo { // Never expire get { return SecurityUtils.MaxUtcDateTime; } } public string UserName { get { return this.userName; } } public string Password { get { return this.password; } } } } // 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
- SoapSchemaExporter.cs
- Wildcard.cs
- RelationshipEnd.cs
- XamlSerializerUtil.cs
- DesignerDataSourceView.cs
- OletxTransactionFormatter.cs
- RectangleGeometry.cs
- SQLBinaryStorage.cs
- MarshalByValueComponent.cs
- TransformDescriptor.cs
- AbstractSvcMapFileLoader.cs
- ContextMenuService.cs
- ProcessInputEventArgs.cs
- SafeCloseHandleCritical.cs
- HtmlWindow.cs
- TextAnchor.cs
- MemberHolder.cs
- SamlAuthenticationClaimResource.cs
- PhonemeEventArgs.cs
- ValueProviderWrapper.cs
- SafeArrayTypeMismatchException.cs
- BitConverter.cs
- BitmapPalettes.cs
- TripleDES.cs
- Site.cs
- PrefixHandle.cs
- XmlArrayAttribute.cs
- ClonableStack.cs
- While.cs
- TagPrefixInfo.cs
- TreeNodeBindingCollection.cs
- CompressionTracing.cs
- SessionState.cs
- XMLUtil.cs
- DataGridItem.cs
- TrackingMemoryStreamFactory.cs
- XmlHierarchicalDataSourceView.cs
- InputMethodStateTypeInfo.cs
- UriParserTemplates.cs
- Menu.cs
- WebPartConnectVerb.cs
- RegexWorker.cs
- TextElementEnumerator.cs
- HtmlLink.cs
- UIElementAutomationPeer.cs
- ExpressionContext.cs
- TextPattern.cs
- ExternalFile.cs
- VisualBrush.cs
- CellRelation.cs
- Point3DCollectionValueSerializer.cs
- PositiveTimeSpanValidator.cs
- TryCatch.cs
- ObjectSerializerFactory.cs
- ContextMenu.cs
- InputReportEventArgs.cs
- FileDialog_Vista_Interop.cs
- AssemblyAttributesGoHere.cs
- DataGridViewToolTip.cs
- EventMappingSettings.cs
- WeakEventManager.cs
- RuleInfoComparer.cs
- CqlParser.cs
- FileVersion.cs
- RecognizerBase.cs
- XPathMessageFilterElementComparer.cs
- TaskbarItemInfo.cs
- TableLayoutStyleCollection.cs
- BitmapMetadata.cs
- StringUtil.cs
- DataSourceExpressionCollection.cs
- GlobalProxySelection.cs
- TrackingProfile.cs
- XmlUtf8RawTextWriter.cs
- DataTableMappingCollection.cs
- ActivityValidator.cs
- DetailsViewDeletedEventArgs.cs
- ClosableStream.cs
- XhtmlBasicObjectListAdapter.cs
- TextBoxView.cs
- ScrollBarAutomationPeer.cs
- COSERVERINFO.cs
- DbBuffer.cs
- HttpServerVarsCollection.cs
- NameNode.cs
- Attributes.cs
- SchemaElementLookUpTable.cs
- ExpressionContext.cs
- BCryptNative.cs
- ToolboxComponentsCreatedEventArgs.cs
- RoutingExtensionElement.cs
- ConfigurationException.cs
- ComplexLine.cs
- HijriCalendar.cs
- SmtpFailedRecipientException.cs
- SelectingProviderEventArgs.cs
- SmiRecordBuffer.cs
- TextTreeObjectNode.cs
- processwaithandle.cs
- CellConstant.cs