Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/auth/atlassian/auth_hash.rb')
-rw-r--r--lib/gitlab/auth/atlassian/auth_hash.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/gitlab/auth/atlassian/auth_hash.rb b/lib/gitlab/auth/atlassian/auth_hash.rb
new file mode 100644
index 00000000000..047e4eabc51
--- /dev/null
+++ b/lib/gitlab/auth/atlassian/auth_hash.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Auth
+ module Atlassian
+ class AuthHash < Gitlab::Auth::OAuth::AuthHash
+ def token
+ credentials[:token]
+ end
+
+ def refresh_token
+ credentials[:refresh_token]
+ end
+
+ def expires?
+ credentials[:expires]
+ end
+
+ def expires_at
+ credentials[:expires_at]
+ end
+
+ private
+
+ def credentials
+ auth_hash[:credentials]
+ end
+ end
+ end
+ end
+end