Class: Onlyoffice::DocsIntegrationSdk::Jwt::ExpClaim

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Claim
Defined in:
lib/onlyoffice/docs_integration_sdk/jwt.rb

Overview

ExpClaim is a claim that represents the expiration time of a JWT.

RFC 7519 Reference

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ttl: 300, leeway: 30) ⇒ void

initialize initializes a new ExpClaim instance.

Parameters:

  • ttl (Integer) (defaults to: 300) —

    The time allowed for the token to be valid, measured in seconds.

  • leeway (Integer) (defaults to: 30) —

    The time allowed to account for clock skew, measured in seconds.

Since:

  • 0.1.0



173
174
175
176
# File 'lib/onlyoffice/docs_integration_sdk/jwt.rb', line 173

def initialize(ttl: 300, leeway: 30)
  @ttl = ttl
  @leeway = leeway
end

Instance Attribute Details

#leeway ⇒ Integer (readonly)

leeway is the time allowed to account for clock skew, measured in seconds.

Returns:

  • (Integer)

Since:

  • 0.1.0



162
163
164
# File 'lib/onlyoffice/docs_integration_sdk/jwt.rb', line 162

def leeway
  @leeway
end

#ttl ⇒ Integer (readonly)

ttl is the time allowed for the token to be valid, measured in seconds.

Returns:

  • (Integer)

Since:

  • 0.1.0



155
156
157
# File 'lib/onlyoffice/docs_integration_sdk/jwt.rb', line 155

def ttl
  @ttl
end