softlayer / softlayer-ruby

http://softlayer.github.io/softlayer-ruby/
MIT License
54 stars 35 forks source link

Add token/password authentication to ruby client #106

Closed renier closed 8 years ago

renier commented 8 years ago

To get a client that will use token-based authentication headers, simply obtain a client using a password like this:

    client = SoftLayer::Client.with_password(username: 'foo', password: 'bar')
    puts client.authentication_headers
    puts client['Account'].getCurrentUser

I increased the version to 3.2, since, follwing semver rules as I understood them, this is not a bug fix but rather a backwards-compatible enhancement.