Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / UserNameSecurityToken.cs / 1 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NativeMethods.cs
- Point3DCollection.cs
- XmlSchemaSimpleType.cs
- Bold.cs
- WebScriptClientGenerator.cs
- IFormattable.cs
- ResizeGrip.cs
- XsltConvert.cs
- KeyBinding.cs
- BasicExpandProvider.cs
- XmlSecureResolver.cs
- SplineKeyFrames.cs
- TextEditorSpelling.cs
- DefinitionBase.cs
- Cloud.cs
- ActionItem.cs
- FunctionMappingTranslator.cs
- PathData.cs
- DbConnectionStringCommon.cs
- DesigntimeLicenseContext.cs
- WebSysDescriptionAttribute.cs
- ListViewUpdatedEventArgs.cs
- EventDescriptorCollection.cs
- Handle.cs
- JsonEncodingStreamWrapper.cs
- Membership.cs
- ToolStripItemClickedEventArgs.cs
- SmtpCommands.cs
- _IPv4Address.cs
- Solver.cs
- DataGridColumnCollection.cs
- ToolStripItemClickedEventArgs.cs
- PropertyMapper.cs
- ComponentGlyph.cs
- OracleInternalConnection.cs
- TimelineClockCollection.cs
- EntityAdapter.cs
- MultiSelectRootGridEntry.cs
- DataKey.cs
- DrawingServices.cs
- DataAccessor.cs
- DiagnosticTraceSource.cs
- MetafileHeader.cs
- StyleCollection.cs
- AppModelKnownContentFactory.cs
- ExtendedPropertyCollection.cs
- IEnumerable.cs
- FixedSOMElement.cs
- DataServiceCollectionOfT.cs
- Focus.cs
- CalendarTable.cs
- XslCompiledTransform.cs
- SoapSchemaMember.cs
- ImageUrlEditor.cs
- TextTreeRootNode.cs
- _UriTypeConverter.cs
- NetSectionGroup.cs
- WeakEventManager.cs
- HttpChannelBindingToken.cs
- InputMethodStateTypeInfo.cs
- FontInfo.cs
- CustomLineCap.cs
- DataGridItemCollection.cs
- XmlCDATASection.cs
- InvalidFilterCriteriaException.cs
- XLinq.cs
- SrgsNameValueTag.cs
- OdbcHandle.cs
- TdsParserStateObject.cs
- JsonStringDataContract.cs
- HttpWebResponse.cs
- GroupLabel.cs
- TransformGroup.cs
- CultureSpecificCharacterBufferRange.cs
- MarkupProperty.cs
- DoubleStorage.cs
- PostBackOptions.cs
- SectionRecord.cs
- CommandHelpers.cs
- AssociationSetMetadata.cs
- SqlCommand.cs
- PrivateFontCollection.cs
- RemotingSurrogateSelector.cs
- SystemKeyConverter.cs
- TimeZoneNotFoundException.cs
- XsdValidatingReader.cs
- Clipboard.cs
- SchemaTableOptionalColumn.cs
- EnumDataContract.cs
- ImageField.cs
- AssociationTypeEmitter.cs
- WmlControlAdapter.cs
- CommandBinding.cs
- FileInfo.cs
- DesignerForm.cs
- ReliableChannelBinder.cs
- GeometryGroup.cs
- WindowsBrush.cs
- XmlSchemaExporter.cs
- TiffBitmapEncoder.cs