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
- UrlAuthFailedErrorFormatter.cs
- CqlIdentifiers.cs
- ClientUriBehavior.cs
- GridViewRow.cs
- SpoolingTask.cs
- HttpRuntime.cs
- StreamingContext.cs
- WebPartCatalogAddVerb.cs
- SchemaImporterExtension.cs
- ClassData.cs
- DataObjectCopyingEventArgs.cs
- WinEventHandler.cs
- Vector3DCollection.cs
- XPathQilFactory.cs
- RijndaelManaged.cs
- SequenceQuery.cs
- SelectionHighlightInfo.cs
- XmlDataDocument.cs
- XmlHierarchyData.cs
- TextParagraphCache.cs
- X509Certificate2.cs
- ContourSegment.cs
- BufferAllocator.cs
- DatePicker.cs
- Debugger.cs
- LinqDataSourceSelectEventArgs.cs
- Win32KeyboardDevice.cs
- WsrmTraceRecord.cs
- StylusButtonEventArgs.cs
- TripleDES.cs
- CursorInteropHelper.cs
- HtmlTableCellCollection.cs
- SecurityRuntime.cs
- MessageHeaderAttribute.cs
- SapiInterop.cs
- ComEventsHelper.cs
- PropertyGrid.cs
- CharEnumerator.cs
- PasswordDeriveBytes.cs
- GridViewCellAutomationPeer.cs
- XmlReaderDelegator.cs
- CallbackValidatorAttribute.cs
- WindowsSlider.cs
- MailMessageEventArgs.cs
- ListViewContainer.cs
- ProcessManager.cs
- XmlNamespaceMappingCollection.cs
- ToolBarButton.cs
- DataGridViewCellValidatingEventArgs.cs
- IdentityHolder.cs
- _CookieModule.cs
- CheckPair.cs
- ScrollChrome.cs
- AllMembershipCondition.cs
- RemotingException.cs
- EmptyReadOnlyDictionaryInternal.cs
- OperationContractGenerationContext.cs
- LZCodec.cs
- log.cs
- PeerObject.cs
- RequestCache.cs
- BaseTemplateCodeDomTreeGenerator.cs
- MemoryFailPoint.cs
- FixedTextPointer.cs
- OperandQuery.cs
- TextServicesHost.cs
- XmlnsDictionary.cs
- RequestUriProcessor.cs
- Image.cs
- CompiledAction.cs
- SQLCharsStorage.cs
- Filter.cs
- StylusPointPropertyId.cs
- UnsafeNativeMethodsTablet.cs
- XmlValidatingReader.cs
- BinaryNode.cs
- TreeNodeStyleCollection.cs
- TraceInternal.cs
- TextModifier.cs
- XamlHostingConfiguration.cs
- TraceFilter.cs
- wgx_render.cs
- WorkflowDefinitionDispenser.cs
- Transform.cs
- SqlDuplicator.cs
- DispatcherEventArgs.cs
- DesignerTransaction.cs
- MD5.cs
- HtmlInputText.cs
- ColumnCollectionEditor.cs
- ActionItem.cs
- SizeAnimation.cs
- ValidationResult.cs
- DataControlField.cs
- XmlConverter.cs
- WmfPlaceableFileHeader.cs
- XmlQueryOutput.cs
- TextFormatterHost.cs
- ZipIOExtraFieldElement.cs
- PeerApplicationLaunchInfo.cs