class Kemal::Hmac::Token
- Kemal::Hmac::Token
- Reference
- Object
Defined in:
kemal-hmac/token.crConstructors
-
.new(subject : String, resource : String, timestamp : String, algorithm : OpenSSL::Algorithm | Nil = nil)
subject
the subject of the token (String)resource
the resource of the token (String)timestamp
the timestamp of the token (String)
Instance Method Summary
-
#hexdigest(secret : String) : String
Build an HMAC token with the given secret
secret
the secret used to build token returns HMAC token (hexdigest)
Constructor Detail
def self.new(subject : String, resource : String, timestamp : String, algorithm : OpenSSL::Algorithm | Nil = nil)
#
subject
the subject of the token (String)
resource
the resource of the token (String)
timestamp
the timestamp of the token (String)
Instance Method Detail
def hexdigest(secret : String) : String
#
Build an HMAC token with the given secret
secret
the secret used to build token
returns HMAC token (hexdigest)