TokenContext Class

Definition

Caution

The 'TokenContext' property is obsolete. Please use 'CallContext' instead.

An opaque context used to store work when working with authentication artifacts.

[System.Obsolete("The 'TokenContext' property is obsolete. Please use 'CallContext' instead.")]
public class TokenContext : Microsoft.IdentityModel.Tokens.CallContext
[<System.Obsolete("The 'TokenContext' property is obsolete. Please use 'CallContext' instead.")>]
type TokenContext = class
    inherit CallContext
Public Class TokenContext
Inherits CallContext
Inheritance
Attributes

Constructors

TokenContext()

Instantiates a new TokenContext with a default activity ID.

TokenContext(Guid)

Instantiates a new TokenContext with an activity ID.

Properties

ActivityId

Gets or set a Guid that will be used in the call to EventSource.SetCurrentThreadActivityId before logging.

(Inherited from LoggerContext)
CaptureLogs

Gets or sets a boolean controlling if logs are written into the context. Useful when debugging.

(Inherited from LoggerContext)
DebugId

Gets or sets a string that helps with setting breakpoints when debugging.

(Inherited from LoggerContext)
Logs

The collection of logs associated with a request. Use CaptureLogs to control capture.

(Inherited from LoggerContext)
PropertyBag

Gets or sets an IDictionary<TKey,TValue> that enables custom extensibility scenarios.

(Inherited from LoggerContext)

Applies to