Module: Conjur::API::TokenExpiration
Constant Summary collapse
- TOKEN_STALE =
The four minutes is to work around a bug in Conjur < 4.7 causing a 404 on long-running operations (when the token is used right around the 5 minute mark).
4.minutes
Instance Attribute Summary collapse
-
#token_born ⇒ Object
Returns the value of attribute token_born.
Instance Method Summary collapse
Methods included from MonotonicTime
Instance Attribute Details
#token_born ⇒ Object
Returns the value of attribute token_born.
282 283 284 |
# File 'lib/conjur/base.rb', line 282 def token_born @token_born end |
Instance Method Details
#needs_token_refresh? ⇒ Boolean
284 285 286 |
# File 'lib/conjur/base.rb', line 284 def needs_token_refresh? token_age > TOKEN_STALE end |
#token_age ⇒ Object
288 289 290 |
# File 'lib/conjur/base.rb', line 288 def token_age gettime - token_born end |