class UserToken < JWT def initialize(user) super({ 'iss': `hostname`.tr("\n", ''), 'dat': Time.now.getutc, 'typ': 'usr', 'usr': user.username, 'admin': user.isAdmin, }) end end