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
- safex509handles.cs
- Triplet.cs
- UInt32Storage.cs
- DesignerUtils.cs
- XsdDuration.cs
- TitleStyle.cs
- DateTimeUtil.cs
- HtmlFormParameterReader.cs
- SimpleType.cs
- PointAnimationBase.cs
- ArrangedElement.cs
- Comparer.cs
- CodeSnippetCompileUnit.cs
- SHA256Cng.cs
- SamlDoNotCacheCondition.cs
- SchemaAttDef.cs
- XsltCompileContext.cs
- PolyLineSegmentFigureLogic.cs
- JsonMessageEncoderFactory.cs
- UIElementParagraph.cs
- Empty.cs
- BindingMAnagerBase.cs
- XPathNodePointer.cs
- StateMachine.cs
- TableItemStyle.cs
- XmlReaderSettings.cs
- NativeRecognizer.cs
- MetafileHeader.cs
- dsa.cs
- TextRunTypographyProperties.cs
- Listbox.cs
- SafeUserTokenHandle.cs
- PropertyIDSet.cs
- base64Transforms.cs
- AnnotationHighlightLayer.cs
- RuleInfoComparer.cs
- HtmlTableRow.cs
- NamespaceCollection.cs
- AssemblyCache.cs
- DataGridViewColumnHeaderCell.cs
- TextElement.cs
- SectionRecord.cs
- VScrollBar.cs
- DataGridViewCell.cs
- FormatterConverter.cs
- HostUtils.cs
- FixedSOMContainer.cs
- ClientSideProviderDescription.cs
- HwndHostAutomationPeer.cs
- updatecommandorderer.cs
- TransactionTable.cs
- OdbcReferenceCollection.cs
- SafeLocalMemHandle.cs
- TextTreeTextBlock.cs
- ISAPIWorkerRequest.cs
- COM2ColorConverter.cs
- ResourceAttributes.cs
- EncodingNLS.cs
- DataGridViewUtilities.cs
- ChangeNode.cs
- EntityDataSourceSelectingEventArgs.cs
- List.cs
- DocumentOrderQuery.cs
- Section.cs
- FontSourceCollection.cs
- TileBrush.cs
- HeaderUtility.cs
- ISessionStateStore.cs
- FrameworkObject.cs
- SHA256Cng.cs
- BrowserCapabilitiesCompiler.cs
- EditorPart.cs
- MexServiceChannelBuilder.cs
- DiagnosticTraceSource.cs
- DebuggerAttributes.cs
- BindingNavigator.cs
- StreamingContext.cs
- FolderNameEditor.cs
- TraceProvider.cs
- AesCryptoServiceProvider.cs
- JpegBitmapDecoder.cs
- SupportsPreviewControlAttribute.cs
- GridItemPatternIdentifiers.cs
- DESCryptoServiceProvider.cs
- QilFactory.cs
- smtppermission.cs
- SizeF.cs
- ClusterRegistryConfigurationProvider.cs
- PenLineJoinValidation.cs
- BehaviorService.cs
- SineEase.cs
- ECDiffieHellmanCng.cs
- UnderstoodHeaders.cs
- MessageBuffer.cs
- FusionWrap.cs
- PageMediaSize.cs
- OpenTypeLayout.cs
- xmlfixedPageInfo.cs
- AppDomainFactory.cs
- Span.cs