Class: EtCcdClient::UiIdamClient

Inherits:
Object
  • Object
show all
Includes:
CommonRestClient
Defined in:
lib/et_ccd_client/ui_idam_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CommonRestClient

#get_request, #post_request

Constructor Details

#initialize(config: ::EtCcdClient.config) ⇒ UiIdamClient

Returns a new instance of UiIdamClient.



9
10
11
12
13
# File 'lib/et_ccd_client/ui_idam_client.rb', line 9

def initialize(config: ::EtCcdClient.config)
  self.config = config
  self.logger = config.logger
  self.user_details = nil
end

Instance Attribute Details

#service_tokenObject (readonly)

Returns the value of attribute service_token.



7
8
9
# File 'lib/et_ccd_client/ui_idam_client.rb', line 7

def service_token
  @service_token
end

#user_detailsObject

Returns the value of attribute user_details.



7
8
9
# File 'lib/et_ccd_client/ui_idam_client.rb', line 7

def user_details
  @user_details
end

#user_tokenObject

Returns the value of attribute user_token.



7
8
9
# File 'lib/et_ccd_client/ui_idam_client.rb', line 7

def user_token
  @user_token
end

Instance Method Details

#login(username: config.sidam_username, password: config.sidam_password) ⇒ Object



15
16
17
18
19
20
# File 'lib/et_ccd_client/ui_idam_client.rb', line 15

def (username: config.sidam_username, password: config.sidam_password)
  logger.tagged('EtCcdClient::UiIdamClient') do
    self.user_token = exchange_sidam_user_token(username, password)
    self.user_details = get_user_details
  end
end