Class: MaticJWT::Generator
- Inherits:
-
Object
- Object
- MaticJWT::Generator
- Defined in:
- lib/matic-jwt/generator.rb
Instance Method Summary collapse
Instance Method Details
#token_for(client_name, secret) ⇒ Object
3 4 5 6 |
# File 'lib/matic-jwt/generator.rb', line 3 def token_for(client_name, secret) payload = {client_name: client_name, exp: EXPIRATION.since.to_i} JWT.encode(payload, secret, ALGORITHM) end |