# Auth Demo - Example for testing tag-based authorization
#
# Run: python -m genro_asgi serve examples/auth_demo

server:
  host: "127.0.0.1"
  port: 8003

middleware:
  cors: on
  auth: on

auth_middleware:
  bearer:
    # Basic roles
    guest_token:
      token: "tk_guest"
      tags: "guest"
    staff_token:
      token: "tk_staff"
      tags: "staff"
    senior_token:
      token: "tk_senior"
      tags: "staff,senior"

    # Department roles
    manager_token:
      token: "tk_manager"
      tags: "staff,manager"
    manager_finance_token:
      token: "tk_manager_finance"
      tags: "staff,manager,finance"
    hr_token:
      token: "tk_hr"
      tags: "staff,hr"
    hr_senior_token:
      token: "tk_hr_senior"
      tags: "staff,hr,senior"

    # Admin roles
    admin_token:
      token: "tk_admin"
      tags: "staff,admin,senior"
    admin_security_token:
      token: "tk_admin_security"
      tags: "staff,admin,security"

    # Special cases
    intern_token:
      token: "tk_intern"
      tags: "staff,hr,intern"
    resigned_token:
      token: "tk_resigned"
      tags: "staff,resigned"
    director_token:
      token: "tk_director"
      tags: "staff,director"

  basic:
    guest:
      password: "guest"
      tags: "guest"
    staff:
      password: "staff123"
      tags: "staff"
    manager:
      password: "manager123"
      tags: "staff,manager"
    hr:
      password: "hr123"
      tags: "staff,hr"
    admin:
      password: "admin123"
      tags: "staff,admin,senior"

sys_apps:
  login_page:
    module: "genro_asgi.sys_applications.login_page.login_page_app:Application"

