Security
Overview
Domain model
type Access = View | Edit
type Feat = About | Admin | Catalog | Sales | Warehouse
type Claims = Map<Feat, Access>
type User =
| Anonymous
| LoggedIn of userName: string * claims: Claimsmember user.CanAccess feat = ... // bool β has any access to the feature
member user.AccessTo feat = ... // Access option β the specific access level
// Active patterns for pattern matching
let (|UserCanAccess|_|) feat (user: User) = ...
let (|UserCanNotAccess|_|) feat (user: User) = ...Login page β persona selection
Persona
About
Catalog
Sales
Warehouse
Admin
Client-side access control
Page routing (View.fs)
View.fs)Conditional rendering in components
Server-side authorization
Passing the token with each request
Token issuance β server-side encryption
Authorization handler (Server/Remoting/Security.fs)
Server/Remoting/Security.fs)API endpoint authorization
Testing Remoting API security
Last updated