Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​IdentityModel.​Tokens.​AppCompatSwitches

Assembly: Microsoft.IdentityModel.Tokens

Inheritance: object → AppCompatSwitches

Identifiers used for switching between different app compat behaviors within the Microsoft.IdentityModel libraries.

Remarks

The Microsoft.IdentityModel libraries use <see cref="T:System.AppContext" /> to turn on or off certain API behavioral changes that might have an effect on application compatibility. This class defines the set of switches that are available to modify library behavior. Application compatibility is favored as the default - so if your application needs to rely on the new behavior, you will need to enable the switch manually. Setting a switch's value can be done programmatically through the <see cref="M:System.AppContext.SetSwitch(System.String,System.Boolean)" /> method, or through other means such as setting it through MSBuild, app configuration, or registry settings. These alternate methods are described in the <see cref="M:System.AppContext.SetSwitch(System.String,System.Boolean)" /> documentation.

Fields and Constants

public const string
UseRfcDefinitionOfEpkAndKid
Uses <see cref="P:Microsoft.IdentityModel.Tokens.EncryptingCredentials.KeyExchangePublicKey" /> for the token's `kid` header parameter. When using ECDH-based key wrap algorithms the public key portion of <see cref="P:Microsoft.IdentityModel.Tokens.EncryptingCredentials.Key" /> is also written to the token's `epk` header parameter.
Remarks Enabling this switch improves the library's conformance to RFC 7518 with regards to how the header values for `kid` and `epk` are set in ECDH key wrap scenarios. The previous behavior erroneously used key ID of <see cref="P:Microsoft.IdentityModel.Tokens.EncryptingCredentials.Key" /> as the `kid` parameter, and did not automatically set `epk` as the spec defines. This switch enables the intended behavior where <see cref="P:Microsoft.IdentityModel.Tokens.EncryptingCredentials.KeyExchangePublicKey" /> is used for `kid` and the public portion of <see cref="P:Microsoft.IdentityModel.Tokens.EncryptingCredentials.Key" /> is used for `epk`.

Methods

public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object