Share via


TwitterOptions 類別

定義

Twitter 驗證處理常式的選項。

public ref class TwitterOptions : Microsoft::AspNetCore::Authentication::RemoteAuthenticationOptions
public class TwitterOptions : Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions
type TwitterOptions = class
    inherit RemoteAuthenticationOptions
Public Class TwitterOptions
Inherits RemoteAuthenticationOptions
繼承

建構函式

TwitterOptions()

初始化 TwitterOptions 類別的新執行個體。

屬性

AccessDeniedPath

取得或設定當使用者未核准遠端伺服器所要求的授權要求時,使用者代理程式會重新導向至的選擇性路徑。 此屬性預設不會設定。 在此情況下,如果遠端授權伺服器傳回access_denied回應,就會擲回例外狀況。

(繼承來源 RemoteAuthenticationOptions)
Backchannel

用來與遠端識別提供者通訊。

(繼承來源 RemoteAuthenticationOptions)
BackchannelHttpHandler

用來與遠端識別提供者通訊的 HttpMessageHandler。 此屬性不能與 BackchannelCertificateValidator 同時設定,除非此值可以向下轉型為 WebRequestHandler。

(繼承來源 RemoteAuthenticationOptions)
BackchannelTimeout

取得或設定與遠端識別提供者進行反向通道通訊的毫秒逾時值。

(繼承來源 RemoteAuthenticationOptions)
CallbackPath

應用程式的基本路徑中將傳回 user-agent 的要求路徑。 中介軟體將會在此要求送達時予以處理。

(繼承來源 RemoteAuthenticationOptions)
ClaimActions

用來從 json 使用者資料中選取值的宣告動作集合,並建立宣告。

ClaimsIssuer

取得或設定應該用於任何已建立宣告的簽發者

(繼承來源 AuthenticationSchemeOptions)
ConsumerKey

取得或設定用來與 Twitter 通訊的取用者索引鍵。

ConsumerSecret

取得或設定用來簽署對 Twitter 之要求的取用者密碼。

CorrelationCookie

決定在 Cookie 新增至回應之前,用來建立相互關聯 Cookie 的設定。

(繼承來源 RemoteAuthenticationOptions)
DataProtectionProvider

取得或設定用來保護資料的型別。

(繼承來源 RemoteAuthenticationOptions)
Events

取得或設定 TwitterEvents 用來處理驗證事件的 。

EventsType

如果設定,則會當做服務類型來取得 Events 實例,而不是 屬性。

(繼承來源 AuthenticationSchemeOptions)
ForwardAuthenticate

如果設定,這會指定此配置應該轉送 AuthenticateAsync 呼叫的目標配置。 例如,CoNtext.AuthenticateAsync (「ThisScheme」) = > CoNtext.AuthenticateAsync (「ForwardAuthenticateValue」) ;將目標設定為目前的配置,以停用轉送並允許正常處理。

(繼承來源 AuthenticationSchemeOptions)
ForwardChallenge

如果設定,這會指定此配置應該轉送 ChallengeAsync 呼叫的目標配置。 例如,CoNtext.ChallengeAsync (「ThisScheme」) = > CoNtext.ChallengeAsync (「ForwardChallengeValue」) ;將目標設定為目前的配置,以停用轉送並允許正常處理。

(繼承來源 AuthenticationSchemeOptions)
ForwardDefault

如果設定,這會指定預設配置,驗證處理常式預設應將所有驗證作業轉送至 。 預設轉送邏輯會先檢查最特定的 ForwardAuthenticate/Challenge/Forbid/SignIn/SignOut 設定,接著檢查 ForwardDefaultSelector,後面接著 ForwardDefault。 第一個非 Null 結果會用來作為要轉送的目標配置。

(繼承來源 AuthenticationSchemeOptions)
ForwardDefaultSelector

用來選取目前要求的預設配置,驗證處理常式預設應將所有驗證作業轉送至 。 預設轉送邏輯會先檢查最特定的 ForwardAuthenticate/Challenge/Forbid/SignIn/SignOut 設定,接著檢查 ForwardDefaultSelector,後面接著 ForwardDefault。 第一個非 Null 結果會用來作為要轉送的目標配置。

(繼承來源 AuthenticationSchemeOptions)
ForwardForbid

如果設定,這會指定此配置應該轉送 ForbidAsync 呼叫的目標配置。 例如,CoNtext.ForbidAsync (「ThisScheme」) = > CoNtext.ForbidAsync (「ForwardForbidValue」) ;將目標設定為目前的配置,以停用轉送並允許正常處理。

(繼承來源 AuthenticationSchemeOptions)
ForwardSignIn

如果設定,這會指定此配置應該轉送 SignInAsync 呼叫的目標配置。 例如,CoNtext.SignInAsync (「ThisScheme」) = > CoNtext.SignInAsync (「ForwardSignInValue」) ;將目標設定為目前的配置,以停用轉送並允許正常處理。

(繼承來源 AuthenticationSchemeOptions)
ForwardSignOut

如果設定,這會指定此配置應該轉送 SignOutAsync 呼叫的目標配置。 例如,CoNtext.SignOutAsync (「ThisScheme」) = > CoNtext.SignOutAsync (「ForwardSignOutValue」) ;將目標設定為目前的配置,以停用轉送並允許正常處理。

(繼承來源 AuthenticationSchemeOptions)
RemoteAuthenticationTimeout

根據預設,取得或設定完成驗證流程的時間限制 (15 分鐘) 。

(繼承來源 RemoteAuthenticationOptions)
RetrieveUserDetails

在驗證程式期間啟用擷取使用者詳細資料,包括電子郵件地址。 擷取電子郵件地址需要每個應用程式之 Twitter 支援的特殊許可權。 預設值為 false。 請參閱 https://dev.twitter.com/rest/reference/get/account/verify_credentials

ReturnUrlParameter

取得或設定參數的名稱,這個參數用來在遠端挑戰觸發到拒絕存取頁面之前傳達使用者的原始位置。 只有在明確指定 時 AccessDeniedPath ,才會使用這個屬性。

(繼承來源 RemoteAuthenticationOptions)
SaveTokens

定義在成功授權之後,是否應該將存取和重新整理權杖儲存在 AuthenticationProperties 中。 此屬性預設會設定為 false ,以減少最終驗證 Cookie 的大小。

(繼承來源 RemoteAuthenticationOptions)
SignInScheme

取得或設定驗證配置,此配置對應至在成功驗證之後負責保存使用者身分識別的中介軟體。 這個值通常對應至在 Startup 類別中註冊的 Cookie 中介軟體。 省略時, DefaultSignInScheme 會當做後援值使用。

(繼承來源 RemoteAuthenticationOptions)
StateCookie

決定在 Cookie 新增至回應之前,用來建立狀態 Cookie 的設定。

StateDataFormat

取得或設定用來保護處理常式所處理之資料的型別。

TimeProvider

用於測試。

(繼承來源 AuthenticationSchemeOptions)

方法

Validate()

已新增驗證方法,以確保 Twitter 驗證中介軟體的客戶金鑰和客戶秘密值不是空的

Validate()

檢查選項是否有效。 如果專案不正常,應該擲回例外狀況。

(繼承來源 RemoteAuthenticationOptions)
Validate(String)

檢查選項是否對特定配置有效

(繼承來源 RemoteAuthenticationOptions)

適用於