2021-12-20 18:13:27 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
class JwtV2 < Jwt
|
|
|
|
private
|
|
|
|
|
|
|
|
def reserved_claims
|
|
|
|
super.merge(
|
|
|
|
iss: Settings.gitlab.base_url,
|
2022-08-18 15:12:17 +00:00
|
|
|
sub: "project_path:#{project.full_path}:ref_type:#{ref_type}:ref:#{source_ref}",
|
2021-12-20 18:13:27 +00:00
|
|
|
aud: Settings.gitlab.base_url
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|