Class: EtCcdClient::UiIdamClient
- Inherits:
-
Object
- Object
- EtCcdClient::UiIdamClient
- Includes:
- CommonRestClient
- Defined in:
- lib/et_ccd_client/ui_idam_client.rb
Instance Attribute Summary collapse
-
#service_token ⇒ Object
readonly
Returns the value of attribute service_token.
-
#user_details ⇒ Object
readonly
Returns the value of attribute user_details.
-
#user_token ⇒ Object
readonly
Returns the value of attribute user_token.
Instance Method Summary collapse
-
#initialize(config: ::EtCcdClient.config) ⇒ UiIdamClient
constructor
A new instance of UiIdamClient.
- #login(username: config.sidam_username, password: config.sidam_password) ⇒ Object
Methods included from CommonRestClient
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_token ⇒ Object (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_details ⇒ Object
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_token ⇒ Object
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 login(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 |