diff options
Diffstat (limited to 'app/models/clusters/applications/jupyter.rb')
-rw-r--r-- | app/models/clusters/applications/jupyter.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/clusters/applications/jupyter.rb b/app/models/clusters/applications/jupyter.rb index 36c51522089..bd9c453e2a4 100644 --- a/app/models/clusters/applications/jupyter.rb +++ b/app/models/clusters/applications/jupyter.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'securerandom' + module Clusters module Applications class Jupyter < ApplicationRecord @@ -80,6 +82,9 @@ module Clusters "secretToken" => secret_token }, "auth" => { + "state" => { + "cryptoKey" => crypto_key + }, "gitlab" => { "clientId" => oauth_application.uid, "clientSecret" => oauth_application.secret, @@ -95,6 +100,10 @@ module Clusters } end + def crypto_key + @crypto_key ||= SecureRandom.hex(32) + end + def project_id cluster&.project&.id end |