Class: Gitlab::Auth::Atlassian::User

Inherits:
OAuth::User show all
Defined in:
lib/gitlab/auth/atlassian/user.rb

Constant Summary

Constants inherited from OAuth::User

OAuth::User::SigninDisabledForProviderError, OAuth::User::SignupDisabledError

Instance Attribute Summary

Attributes inherited from OAuth::User

#auth_hash

Class Method Summary collapse

Methods inherited from OAuth::User

#bypass_two_factor?, #find_and_update!, find_by_uid_and_provider, #find_user, #gl_user, #initialize, #new?, #persisted?, #protocol_name, #save, #valid?, #valid_sign_in?

Constructor Details

This class inherits a constructor from Gitlab::Auth::OAuth::User

Class Method Details

.assign_identity_from_auth_hash!(identity, auth_hash) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/gitlab/auth/atlassian/user.rb', line 7

def self.assign_identity_from_auth_hash!(identity, auth_hash)
  identity.extern_uid = auth_hash.uid
  identity.token = auth_hash.token
  identity.refresh_token = auth_hash.refresh_token
  identity.expires_at = Time.at(auth_hash.expires_at).utc.to_datetime if auth_hash.expires?

  identity
end