Skip to content

Commit f275bd5

Browse files
authored
Update security abstractions (#35863)
1 parent 9f5fdfd commit f275bd5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

aspnetcore/blazor/security/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,13 +535,13 @@ Two additional abstractions participate in managing authentication state:
535535

536536
* <xref:Microsoft.AspNetCore.Components.Server.RevalidatingServerAuthenticationStateProvider> ([reference source](https://github.com/dotnet/aspnetcore/blob/main/src/Components/Server/src/Circuits/RevalidatingServerAuthenticationStateProvider.cs)): A base class for <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider> services used by the Blazor framework to receive an authentication state from the host environment and revalidate it at regular intervals.
537537

538-
The default 30 minute revalidation interval can be adjusted in [`RevalidatingIdentityAuthenticationStateProvider` (reference source)](https://github.com/dotnet/aspnetcore/blob/v7.0.0/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Areas/Identity/RevalidatingIdentityAuthenticationStateProvider.cs#L26). The following example shortens the interval to 20 minutes:
538+
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
539539

540-
```csharp
541-
protected override TimeSpan RevalidationInterval => TimeSpan.FromMinutes(20);
542-
```
540+
In apps generated from the Blazor project template for .NET 8 or later, adjust the default 30 minute revalidation interval in `IdentityRevalidatingAuthenticationStateProvider`. Earlier than .NET 8, adjust the interval in `RevalidatingIdentityAuthenticationStateProvider`. The following example shortens the interval to 20 minutes:
543541

544-
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
542+
```csharp
543+
protected override TimeSpan RevalidationInterval => TimeSpan.FromMinutes(20);
544+
```
545545

546546
### Authentication state management at sign out
547547

0 commit comments

Comments
 (0)