Class: Prof::UAAClient

Inherits:
Object
  • Object
show all
Defined in:
lib/prof/uaa_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(system_domain, cloud_controller_username, cloud_controller_password) ⇒ UAAClient

Returns a new instance of UAAClient.



15
16
17
18
19
# File 'lib/prof/uaa_client.rb', line 15

def initialize(system_domain, cloud_controller_username, cloud_controller_password)
  @system_domain             = system_domain
  @cloud_controller_username = cloud_controller_username
  @cloud_controller_password = cloud_controller_password
end

Instance Method Details

#register_user(user) ⇒ Object



21
22
23
# File 'lib/prof/uaa_client.rb', line 21

def register_user(user)
  scim.add(:user, scim_info(user))
end

#unregister_user(user) ⇒ Object



25
26
27
# File 'lib/prof/uaa_client.rb', line 25

def unregister_user(user)
  scim.delete(:user, scim.id(:user, user.username))
end