FarmerOAuthTokens.GetOAuthConnectionLink メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
OAuth フローで必要な接続リンクを返します。
public virtual Azure.Response GetOAuthConnectionLink (Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member GetOAuthConnectionLink : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.GetOAuthConnectionLink : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function GetOAuthConnectionLink (content As RequestContent, Optional context As RequestContext = Nothing) As Response
パラメーター
- content
- RequestContent
要求の本文として送信するコンテンツ。 要求本文スキーマの詳細については、以下の「解説」セクションを参照してください。
- context
- RequestContext
要求コンテキスト。これは、クライアント パイプラインの既定の動作を呼び出しごとにオーバーライドできます。
戻り値
サービスから返された応答。
例外
content
が null です。
サービスから成功以外の状態コードが返されました。
例
このサンプルでは、必要な要求コンテンツを使用して GetOAuthConnectionLink を呼び出す方法と、結果を解析する方法を示します。
var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(<2022-11-01-preview>);
var data = new {
partyId = "<partyId>",
oAuthProviderId = "<oAuthProviderId>",
userRedirectLink = "<userRedirectLink>",
};
Response response = client.GetOAuthConnectionLink(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
このサンプルでは、すべての要求コンテンツで GetOAuthConnectionLink を呼び出す方法と、結果を解析する方法を示します。
var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(<2022-11-01-preview>);
var data = new {
partyId = "<partyId>",
oAuthProviderId = "<oAuthProviderId>",
userRedirectLink = "<userRedirectLink>",
userRedirectState = "<userRedirectState>",
};
Response response = client.GetOAuthConnectionLink(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
注釈
要求ペイロードの JSON スキーマを次に示します。
要求本文:
の OAuthConnectRequest
スキーマ:
{
partyId: string, # Required. Id of the party.
oAuthProviderId: string, # Required. Id of the OAuthProvider.
userRedirectLink: string, # Required. Link to redirect the user to, at the end of the oauth flow.
userRedirectState: string, # Optional. State to provide back when redirecting the user, at the end of the oauth flow.
}
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Azure SDK for .NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示