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
- LambdaCompiler.ControlFlow.cs
- StandardOleMarshalObject.cs
- SpotLight.cs
- FileLogRecordHeader.cs
- CompoundFileIOPermission.cs
- XslAst.cs
- PerfCounters.cs
- StyleCollectionEditor.cs
- figurelengthconverter.cs
- DataGridViewRowEventArgs.cs
- IndexingContentUnit.cs
- mediapermission.cs
- SqlInfoMessageEvent.cs
- ObjectAnimationUsingKeyFrames.cs
- ConfigUtil.cs
- WindowsFormsSectionHandler.cs
- FusionWrap.cs
- EntityTypeBase.cs
- ResourceIDHelper.cs
- XsltException.cs
- Transform3DGroup.cs
- WorkerRequest.cs
- UnsafeNativeMethods.cs
- ConcurrentStack.cs
- ToolStripProgressBar.cs
- UrlMappingCollection.cs
- SiteMapDataSourceView.cs
- ScriptReferenceEventArgs.cs
- OracleDataAdapter.cs
- DynamicDataRoute.cs
- PagerSettings.cs
- ScriptingSectionGroup.cs
- WindowsListViewGroupHelper.cs
- CompiledRegexRunner.cs
- LinearKeyFrames.cs
- CommonProperties.cs
- DBConcurrencyException.cs
- _ContextAwareResult.cs
- DotExpr.cs
- InvalidDataException.cs
- Utils.cs
- HttpCapabilitiesEvaluator.cs
- cookieexception.cs
- ViewSimplifier.cs
- MailMessage.cs
- XmlSchemaAppInfo.cs
- TextView.cs
- EventHandlers.cs
- AesManaged.cs
- MediaElementAutomationPeer.cs
- RoutedEventArgs.cs
- StopRoutingHandler.cs
- ListViewContainer.cs
- DataService.cs
- RequestResizeEvent.cs
- ComponentGlyph.cs
- CSharpCodeProvider.cs
- AssemblyInfo.cs
- StorageSetMapping.cs
- IMembershipProvider.cs
- Point3DCollection.cs
- WebPartsPersonalization.cs
- XhtmlTextWriter.cs
- JapaneseLunisolarCalendar.cs
- WindowsSecurityToken.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- ColorEditor.cs
- PropVariant.cs
- EnumValAlphaComparer.cs
- Compensation.cs
- ListViewItem.cs
- SqlBooleanMismatchVisitor.cs
- ImportCatalogPart.cs
- SoapSchemaImporter.cs
- BamlRecordWriter.cs
- CommandEventArgs.cs
- ActivityMarkupSerializer.cs
- clipboard.cs
- LongAverageAggregationOperator.cs
- BindableTemplateBuilder.cs
- EmptyStringExpandableObjectConverter.cs
- AsyncOperation.cs
- CheckBox.cs
- BitmapEffectInputData.cs
- PersonalizationEntry.cs
- ListItemConverter.cs
- OperatingSystem.cs
- ReachFixedPageSerializer.cs
- HtmlLink.cs
- AttributeUsageAttribute.cs
- ShapingWorkspace.cs
- HtmlShim.cs
- SecurityElementBase.cs
- TreeNodeStyleCollection.cs
- CorrelationToken.cs
- RtfFormatStack.cs
- ModelItemCollectionImpl.cs
- Keywords.cs
- Triplet.cs
- ReadOnlyDataSource.cs