dongrote / home-network-admin

A tiny server to provide a RESTful interface for Siri Shortcuts at home
MIT License
1 stars 0 forks source link

add scope to JWT #59

Open dongrote opened 4 years ago

dongrote commented 4 years ago

Add scopes to JWT.

E.g.,

scope = [
  'devices:read',  // ability to read existing devices and their state
  'devices:write',  // ability to create / delete / modify device entries
  'devices:block', // ability to block devices
  'devices:unblock',  // ability to unblock devices
  'services:read', // ability to read existing services and their state
  'services:write', // ability to create / delete / modify service entries
  'services:block',  // ability to block services
  'services:unblock', // ability to unblock services
  'wol:read', // ability to read existing wakeonlan devices
  'wol:write', // ability to create / delete / modify wakeonlan device entries
  'wol:wake', // ability to wake up devices
]