Authorization
Client Credential     Authentication Code

    <% if session["ClientCredential"].nil? %>
  1. 1. Login
    clientcredential_config = ClientCredentialConfiguration.new(config);
    connection = ADPApiConnectionFactory::createConnection(clientcredential_config)
    connection.connect();
    
  2. <% end %> <% if !session["ClientCredential"].nil? %>
  3. 1. Logged in
    clientcredential_config = ClientCredentialConfiguration.new(config);
    connection = ADPApiConnectionFactory::createConnection(clientcredential_config)
    connection.connect();
    

  4. 2. Logout
    connection.logout()
  5. <% end %>