共用方式為


AuthorizationPolicyBuilder.RequireAuthenticatedUser 方法

定義

將 新增 DenyAnonymousAuthorizationRequirement 至目前的 實例,以強制執行目前使用者已驗證。

public:
 Microsoft::AspNetCore::Authorization::AuthorizationPolicyBuilder ^ RequireAuthenticatedUser();
public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAuthenticatedUser ();
member this.RequireAuthenticatedUser : unit -> Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder
Public Function RequireAuthenticatedUser () As AuthorizationPolicyBuilder

傳回

完成作業之後,這個執行個體的參考。

適用於