MicrosoftIdentityAuthenticationException コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| Name | 説明 |
|---|---|
| MicrosoftIdentityAuthenticationException(String) |
指定したエラー メッセージを使用して、 MicrosoftIdentityAuthenticationException クラスの新しいインスタンスを初期化します。 |
| MicrosoftIdentityAuthenticationException(String, Exception) |
指定したエラー メッセージと、この例外の原因である内部例外への参照を使用して、 MicrosoftIdentityAuthenticationException クラスの新しいインスタンスを初期化します。 |
MicrosoftIdentityAuthenticationException(String)
指定したエラー メッセージを使用して、 MicrosoftIdentityAuthenticationException クラスの新しいインスタンスを初期化します。
public MicrosoftIdentityAuthenticationException(string message);
new Microsoft.Identity.Web.MicrosoftIdentityAuthenticationException : string -> Microsoft.Identity.Web.MicrosoftIdentityAuthenticationException
Public Sub New (message As String)
パラメーター
- message
- String
例外の理由を説明するエラー メッセージ。
例
throw new MicrosoftIdentityAuthenticationException(
"Authentication options must be configured either in default options or per-request using WithAuthenticationOptions().");
適用対象
MicrosoftIdentityAuthenticationException(String, Exception)
指定したエラー メッセージと、この例外の原因である内部例外への参照を使用して、 MicrosoftIdentityAuthenticationException クラスの新しいインスタンスを初期化します。
public MicrosoftIdentityAuthenticationException(string message, Exception innerException);
new Microsoft.Identity.Web.MicrosoftIdentityAuthenticationException : string * Exception -> Microsoft.Identity.Web.MicrosoftIdentityAuthenticationException
Public Sub New (message As String, innerException As Exception)
パラメーター
- message
- String
例外の理由を説明するエラー メッセージ。
- innerException
- Exception
現在の例外の原因である例外。内部例外が指定されていない場合は null 。
例
try
{
var authHeader = await headerProvider.CreateAuthorizationHeaderAsync(scopes, options);
}
catch (Exception ex)
{
throw new MicrosoftIdentityAuthenticationException("Failed to acquire authorization header.", ex);
}
注釈
基になるトークン取得プロバイダーからの例外など、認証エラーの原因となった元の例外を保持する場合は、このコンストラクターを使用します。