PlaceOS/driver

add support for generating JWT tokens for API access

Closed this issue · 3 comments

Provide helpers for drivers that need to access the PlaceOS API
i.e.
token_for(user@email) or token_for(user_id) as well as adding a current_user #=> String? helper

possibly the JWT generation occurs in the Core process and is part of the standard driver <=> core protocol
we can launch the drivers with a custom ENV to prevent them accessing the private key that core will access via the ENV

thoughts on this process?

Granting the power to generate tokens for arbitrary users seems risky. What about limiting to the current user only?

Removing myself as an assignee so that we have a cleaner view for scheduling. Pipe it back my way though if you need me to take a squiz at implementation.