Skip to content

woile/demo-biscuit-axum-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auth using Biscuit

Example application using biscuit

Endpoints

See rest.http

  1. /login -> authenticate and receive a biscuit token in a cookie
  2. /register -> create user
  3. /is_auth -> returns 401 when no token present, 403 invalid creds or 200

Usage

  1. Clone this repo
  2. Run cargo run
  3. Go to rest.http (In VSCode you'll the Rest Client Extension)
  4. Use the queries

Login workflow

sequenceDiagram
    actor user
    participant browser
    user->>+auth: POST /login (user+pass)
    auth->>-browser: set session cookie
    browser->>+auth: /is_auth (with cookie)
    auth->>-browser: ok

TODO

  • Add .well-known/ endpoint with pub key
  • Add is_admin endpoint, use RBAC example for this