Skip to content

Commit 45c02ad

Browse files
authored
Update README.md file.
1 parent 810fbf9 commit 45c02ad

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,10 @@ Here is an example of how you can implement your own authentication and authoriz
100100
``` csharp
101101
public class CustomAuthorizeFilter : IUiAuthorizationFilter
102102
{
103-
public bool Authorize(DashboardContext context)
103+
public bool Authorize(HttpContext httpContext)
104104
{
105-
var httpContext = context.GetHttpContext();
106-
107105
// Allow all authenticated users to see the Dashboard (potentially dangerous).
108-
return httpContext.User.Identity?.IsAuthenticated ?? false;
106+
return httpContext.User.Identity is { IsAuthenticated: true };
109107
}
110108
}
111109
```

0 commit comments

Comments
 (0)