diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-11 14:15:18 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-11 14:15:18 +0300 |
commit | 187face620cfa0d5617a1c49e28dfbb20134fe41 (patch) | |
tree | 875bd85b7224c48b463cece65b134dfd4b1c41dd /app | |
parent | ae5d2f5b3132b6ce6fefe5fdef764616bbec3a5d (diff) |
CLeanup CI helpers since we dont use oauth any more
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/ci/user_sessions_helper.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/app/helpers/ci/user_sessions_helper.rb b/app/helpers/ci/user_sessions_helper.rb deleted file mode 100644 index 0296a74395c..00000000000 --- a/app/helpers/ci/user_sessions_helper.rb +++ /dev/null @@ -1,32 +0,0 @@ -module Ci - module UserSessionsHelper - def generate_oauth_salt - SecureRandom.hex(16) - end - - def generate_oauth_hmac(salt, return_to) - return unless return_to - digest = OpenSSL::Digest.new('sha256') - key = Gitlab::Application.secrets.db_key_base + salt - OpenSSL::HMAC.hexdigest(digest, key, return_to) - end - - def generate_oauth_state(return_to) - return unless return_to - salt = generate_oauth_salt - hmac = generate_oauth_hmac(salt, return_to) - "#{salt}:#{hmac}:#{return_to}" - end - - def get_ouath_state_return_to(state) - state.split(':', 3)[2] if state - end - - def is_oauth_state_valid?(state) - return true unless state - salt, hmac, return_to = state.split(':', 3) - return false unless return_to - hmac == generate_oauth_hmac(salt, return_to) - end - end -end |