Class: Gitlab::Ci::Jwt
- Inherits:
-
JwtBase
- Object
- JSONWebToken::Token
- JwtBase
- Gitlab::Ci::Jwt
- Defined in:
- lib/gitlab/ci/jwt.rb
Direct Known Subclasses
Constant Summary collapse
- NOT_BEFORE_TIME =
5
- DEFAULT_EXPIRE_TIME =
60 * 5
Constants inherited from JwtBase
Gitlab::Ci::JwtBase::NoSigningKeyError
Constants inherited from JSONWebToken::Token
JSONWebToken::Token::DEFAULT_NOT_BEFORE_TIME
Instance Attribute Summary
Attributes inherited from JSONWebToken::Token
#audience, #expire_time, #id, #issued_at, #issuer, #not_before, #subject
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(build, ttl:) ⇒ Jwt
constructor
A new instance of Jwt.
Methods inherited from JwtBase
Methods inherited from JSONWebToken::Token
Constructor Details
#initialize(build, ttl:) ⇒ Jwt
Returns a new instance of Jwt.
13 14 15 16 17 18 |
# File 'lib/gitlab/ci/jwt.rb', line 13 def initialize(build, ttl:) super() @build = build @ttl = ttl end |
Class Method Details
.for_build(build) ⇒ Object
9 10 11 |
# File 'lib/gitlab/ci/jwt.rb', line 9 def self.for_build(build) self.new(build, ttl: build.).encoded end |