Blazor ToC improvements (#19140)

pull/19158/head
Luke Latham 2020-07-09 05:35:28 -05:00 committed by GitHub
parent 1af2e6ab8f
commit 4969235ab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 64 deletions

View File

@ -60,6 +60,8 @@ In the preceding example:
* The <xref:Microsoft.AspNetCore.Components.Forms.ValidationSummary> component summarizes validation messages.
* `HandleValidSubmit` is triggered when the form successfully submits (passes validation).
## Built-in forms components
A set of built-in input components are available to receive and validate user input. Inputs are validated when they're changed and when a form is submitted. Available input components are shown in the following table.
| Input component | Rendered as&hellip; |

View File

@ -26,7 +26,11 @@ The following code sample shows the Razor template of a layout component, `MainL
[!code-razor[](layouts/sample_snapshot/3.x/MainLayout.razor?highlight=1,13)]
In an app based on one of the Blazor app templates, the `MainLayout` component (`MainLayout.razor`) is in the app's `Shared` folder.
## `MainLayout` component
In an app based on one of the Blazor project templates, the `MainLayout` component (`MainLayout.razor`) is in the app's `Shared` folder:
[!code-razor[](./common/samples/3.x/BlazorWebAssemblySample/Shared/MainLayout.razor)]
## Default layout

View File

@ -43,6 +43,18 @@ The [`Microsoft.AspNetCore.Components.WebAssembly.Authentication`](https://www.n
* If the authentication process completes successfully, the user is authenticated and optionally sent back to the original protected URL that the user requested.
* If the authentication process fails for any reason, the user is sent to the login failed page (`/authentication/login-failed`), and an error is displayed.
## `Authentication` component
The `Authentication` component (`Pages/Authentication.razor`) handles remote authentication operations and permits the app to:
* Configure app routes for authentication states.
* Set UI content for authentication states.
* Manage authentication state.
Authentication actions, such as registering or signing in a user, are passed to the Blazor framework's <xref:Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticatorViewCore%601> component, which persists and controls state across authentication operations.
For more information and examples, see <xref:blazor/security/webassembly/additional-scenarios>.
## Authorization
In Blazor WebAssembly apps, authorization checks can be bypassed because all client-side code can be modified by users. The same is true for all client-side app technologies, including JavaScript SPA frameworks or native apps for any operating system.

View File

@ -320,31 +320,31 @@
- name: Built-in components
items:
- name: App
uid: blazor/templates
href: blazor/templates.md#blazor-project-structure
- name: Authentication
uid: blazor/security/webassembly/additional-scenarios
href: blazor/security/webassembly/index.md#authentication-component
- name: AuthorizeView
uid: blazor/security/index
href: blazor/security/index.md#authorizeview-component
- name: InputCheckbox
uid: blazor/forms-validation
href: blazor/forms-validation.md#built-in-forms-components
- name: InputDate
uid: blazor/forms-validation
href: blazor/forms-validation.md#built-in-forms-components
- name: InputNumber
uid: blazor/forms-validation
href: blazor/forms-validation.md#built-in-forms-components
- name: InputSelect
uid: blazor/forms-validation
href: blazor/forms-validation.md#built-in-forms-components
- name: InputText
uid: blazor/forms-validation
href: blazor/forms-validation.md#built-in-forms-components
- name: InputTextArea
uid: blazor/forms-validation
href: blazor/forms-validation.md#built-in-forms-components
- name: MainLayout
uid: blazor/layouts
href: blazor/layouts.md#mainlayout-component
- name: NavLink
uid: blazor/fundamentals/routing
href: blazor/fundamentals/routing.md#navlink-component
- name: NavMenu
uid: blazor/fundamentals/routing
href: blazor/fundamentals/routing.md#navlink-component
- name: Router
uid: blazor/fundamentals/routing
href: blazor/fundamentals/routing.md#route-templates
- name: Cascading values and parameters
uid: blazor/components/cascading-values-and-parameters
- name: Data binding
@ -927,16 +927,6 @@
- name: Health checks
uid: host-and-deploy/health-checks
displayName: deploy, publish
- name: Blazor
items:
- name: Overview
uid: blazor/host-and-deploy/index
- name: Blazor WebAssembly
uid: blazor/host-and-deploy/webassembly
- name: Blazor Server
uid: blazor/host-and-deploy/server
- name: Configure the Linker
uid: blazor/host-and-deploy/configure-linker
- name: Security and Identity
displayName: authentication, authorization
items:
@ -1169,42 +1159,6 @@
uid: security/ip-safelist
- name: Application security - OWASP
href: https://cheatsheetseries.owasp.org/cheatsheets/DotNet_Security_Cheat_Sheet.html
- name: Blazor
items:
- name: Overview
uid: blazor/security/index
- name: Blazor WebAssembly
items:
- name: Overview
uid: blazor/security/webassembly/index
- name: Standalone with Authentication library
uid: blazor/security/webassembly/standalone-with-authentication-library
- name: Standalone with Microsoft Accounts
uid: blazor/security/webassembly/standalone-with-microsoft-accounts
- name: Standalone with AAD
uid: blazor/security/webassembly/standalone-with-azure-active-directory
- name: Standalone with AAD B2C
uid: blazor/security/webassembly/standalone-with-azure-active-directory-b2c
- name: Hosted with AAD
uid: blazor/security/webassembly/hosted-with-azure-active-directory
- name: Hosted with AAD B2C
uid: blazor/security/webassembly/hosted-with-azure-active-directory-b2c
- name: Hosted with Identity Server
uid: blazor/security/webassembly/hosted-with-identity-server
- name: Additional scenarios
uid: blazor/security/webassembly/additional-scenarios
- name: AAD groups and roles
uid: blazor/security/webassembly/aad-groups-roles
- name: Blazor Server
items:
- name: Overview
uid: blazor/security/server/index
- name: Threat mitigation
uid: blazor/security/server/threat-mitigation
- name: Additional scenarios
uid: blazor/security/server/additional-scenarios
- name: Content Security Policy
uid: blazor/security/content-security-policy
- name: Performance
items:
- name: Overview
@ -1229,8 +1183,6 @@
uid: performance/diagnostic-tools
- name: Load and stress testing
uid: test/loadtests
- name: Blazor WebAssembly
uid: blazor/webassembly-performance-best-practices
- name: Globalization and localization
items:
- name: Overview

View File

@ -129,7 +129,7 @@ In this tutorial, you learned how to:
> * Use event handling and data binding in components
> * Use dependency injection (DI) and routing in a Blazor app
Learn about the Blazor project templates:
Learn about tooling for ASP.NET Core Blazor:
> [!div class="nextstepaction"]
> <xref:blazor/templates>
> <xref:blazor/tooling>