AuthorizationBuilder.SetDefaultPolicy(AuthorizationPolicy) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定預設授權原則。 預設為需要已驗證的使用者。
public virtual Microsoft.AspNetCore.Authorization.AuthorizationBuilder SetDefaultPolicy (Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy);
abstract member SetDefaultPolicy : Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
override this.SetDefaultPolicy : Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
Public Overridable Function SetDefaultPolicy (policy As AuthorizationPolicy) As AuthorizationBuilder
參數
- policy
- AuthorizationPolicy
傳回
產生器。
備註
評估 IAuthorizeData 時使用的預設原則,未指定任何原則名稱。