Newer
Older
Website-backend / lib / UserToken.rb
@lukas lukas on 3 Apr 2022 248 bytes initial commit
class UserToken < JWT
    def initialize(user)
        super({
                'iss': `hostname`.tr("\n", ''),
                'dat': Time.now.getutc,
                'typ': 'usr',
                'usr': user.username}
                )
    end
end