diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2016-08-19 19:10:41 +0200 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2016-09-05 15:05:31 +0200 |
commit | c87540ed46ba8756154f767be99f80be75c27a43 (patch) | |
tree | 750f6f104743d49f93df191b656264211dba103e /spec/support/workhorse_helpers.rb | |
parent | 89af76edc5e44ad1a0a55a65337bb992355911a6 (diff) | |
download | gitlab-ce-c87540ed46ba8756154f767be99f80be75c27a43.tar.gz |
Verify JWT messages from gitlab-workhorse
Diffstat (limited to 'spec/support/workhorse_helpers.rb')
-rw-r--r-- | spec/support/workhorse_helpers.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/workhorse_helpers.rb b/spec/support/workhorse_helpers.rb index 107b6e30924..47673cd4c3a 100644 --- a/spec/support/workhorse_helpers.rb +++ b/spec/support/workhorse_helpers.rb @@ -13,4 +13,9 @@ module WorkhorseHelpers ] end end + + def workhorse_internal_api_request_header + jwt_token = JWT.encode({ 'iss' => 'gitlab-workhorse' }, Gitlab::Workhorse.secret, 'HS256') + { 'HTTP_' + Gitlab::Workhorse::INTERNAL_API_REQUEST_HEADER.upcase.tr('-', '_') => jwt_token } + end end |