Class: JWT::Encode
- Inherits:
-
Object
- Object
- JWT::Encode
- Defined in:
- lib/jwt/encode.rb
Overview
The Encode class is responsible for encoding JWT tokens.
Instance Method Summary collapse
-
#initialize(options) ⇒ Encode
constructor
Initializes a new Encode instance.
-
#segments ⇒ String
Encodes the JWT token and returns its segments.
Constructor Details
Instance Method Details
#segments ⇒ String
Encodes the JWT token and returns its segments.
24 25 26 27 28 |
# File 'lib/jwt/encode.rb', line 24 def segments @token.verify_claims!(:numeric) @token.sign!(algorithm: @algorithm, key: @key) @token.jwt end |