Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / SecurityToken.cs / 1 / SecurityToken.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.IdentityModel.Tokens { using System.Collections.ObjectModel; public abstract class SecurityToken { public abstract string Id { get; } public abstract ReadOnlyCollectionSecurityKeys { get; } public abstract DateTime ValidFrom { get; } public abstract DateTime ValidTo { get; } public virtual bool CanCreateKeyIdentifierClause () where T : SecurityKeyIdentifierClause { return ((typeof(T) == typeof(LocalIdKeyIdentifierClause)) && CanCreateLocalKeyIdentifierClause()); } public virtual T CreateKeyIdentifierClause () where T : SecurityKeyIdentifierClause { if ((typeof(T) == typeof(LocalIdKeyIdentifierClause)) && CanCreateLocalKeyIdentifierClause()) return new LocalIdKeyIdentifierClause(this.Id, this.GetType()) as T; throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException( SR.GetString(SR.TokenDoesNotSupportKeyIdentifierClauseCreation, GetType().Name, typeof(T).Name))); } public virtual bool MatchesKeyIdentifierClause(SecurityKeyIdentifierClause keyIdentifierClause) { LocalIdKeyIdentifierClause localKeyIdentifierClause = keyIdentifierClause as LocalIdKeyIdentifierClause; if (localKeyIdentifierClause != null) return localKeyIdentifierClause.Matches(this.Id, this.GetType()); return false; } public virtual SecurityKey ResolveKeyIdentifierClause(SecurityKeyIdentifierClause keyIdentifierClause) { if (this.SecurityKeys.Count != 0 && MatchesKeyIdentifierClause(keyIdentifierClause)) return this.SecurityKeys[0]; return null; } bool CanCreateLocalKeyIdentifierClause() { return (this.Id != null); } } } // 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
- Native.cs
- Dispatcher.cs
- MenuAdapter.cs
- ExtendedPropertyDescriptor.cs
- ContentElement.cs
- contentDescriptor.cs
- TextElement.cs
- MenuStrip.cs
- CurrencyWrapper.cs
- HtmlGenericControl.cs
- TableAdapterManagerHelper.cs
- DataControlLinkButton.cs
- TrustLevelCollection.cs
- PolyQuadraticBezierSegment.cs
- Memoizer.cs
- SimpleRecyclingCache.cs
- TextSelection.cs
- Baml6Assembly.cs
- NotificationContext.cs
- CngAlgorithmGroup.cs
- CssStyleCollection.cs
- RangeBaseAutomationPeer.cs
- XmlRawWriterWrapper.cs
- Debug.cs
- RepeaterItemEventArgs.cs
- WinFormsComponentEditor.cs
- PolyBezierSegmentFigureLogic.cs
- XmlSerializerFactory.cs
- DecimalFormatter.cs
- DataGridViewCellMouseEventArgs.cs
- SendContent.cs
- DetailsViewInsertedEventArgs.cs
- ToolboxDataAttribute.cs
- QilTypeChecker.cs
- Emitter.cs
- CompressStream.cs
- BridgeDataRecord.cs
- ClientProxyGenerator.cs
- _DigestClient.cs
- UnsafeNativeMethods.cs
- InheritanceRules.cs
- DoubleKeyFrameCollection.cs
- HostedElements.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- WorkflowTransactionService.cs
- EntityStoreSchemaGenerator.cs
- DataSourceListEditor.cs
- UIPropertyMetadata.cs
- OdbcRowUpdatingEvent.cs
- securestring.cs
- XamlGridLengthSerializer.cs
- CssStyleCollection.cs
- GridViewRowEventArgs.cs
- TreeViewEvent.cs
- shaperfactory.cs
- CallbackHandler.cs
- SqlProfileProvider.cs
- MultipartIdentifier.cs
- ValidatorUtils.cs
- TextAction.cs
- LogRecordSequence.cs
- Crc32.cs
- BoundPropertyEntry.cs
- DispatcherObject.cs
- DBParameter.cs
- CallSiteHelpers.cs
- WebFaultClientMessageInspector.cs
- FontFamilyIdentifier.cs
- TextRenderingModeValidation.cs
- BuildProvidersCompiler.cs
- FormViewUpdatedEventArgs.cs
- TemplateModeChangedEventArgs.cs
- TableRowsCollectionEditor.cs
- ProxyWebPart.cs
- XmlSchemaDatatype.cs
- XmlCodeExporter.cs
- UITypeEditor.cs
- Geometry3D.cs
- XamlStyleSerializer.cs
- RenderingEventArgs.cs
- ConnectionOrientedTransportManager.cs
- MulticastOption.cs
- HttpCacheVary.cs
- TreeViewItemAutomationPeer.cs
- DataMemberAttribute.cs
- rsa.cs
- ExpressionNode.cs
- EntryPointNotFoundException.cs
- Animatable.cs
- DataListItemEventArgs.cs
- XLinq.cs
- SizeLimitedCache.cs
- ColumnMapTranslator.cs
- XmlProcessingInstruction.cs
- CssTextWriter.cs
- PersonalizationProvider.cs
- TemplateAction.cs
- DotExpr.cs
- TextSelectionHighlightLayer.cs
- ToolStripGrip.cs