You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on this CLI used to interact with SoftLayer Object Storage, specifically on IBM Bluemix.
To get a Connection object, I need to authenticate with each command. This requires a couple of requests to bluemix.net unless I have my Object Storage service credentials saved locally. If I'm not caching creds, it takes ~5-8 seconds for each command. And I often find myself having to string commands together, so those seconds add up fast.
I'm not thrilled about caching service credentials that don't change, and would feel a lot better about storing the expiring Auth Token and taking the longer time to get a new one as needed. Is there currently a way for me to get an active Connection object with just my Auth Token and Storage URL or can I only obtain one with the service credentials?
Thanks!
The text was updated successfully, but these errors were encountered:
Is there currently a way for me to get an active Connection object with just my Auth Token and Storage URL or can I only obtain one with the service credentials?
Sure, just stick the StorageUrl and AuthToken in the swift.Connection object and you should be good to go.go
You'll see that the Authenticated function only checks that these are both non empty.
Stuff will go wrong when the auth token expires though...
Sorry, forgot to get back to you. But that did the trick!
I had tried that earlier but then called Authenticate and when that errored out I figured it wasn't the right approach. Perhaps a different error or none at all if Authenticate is called with those fields already populated?
I had tried that earlier but then called Authenticate and when that errored out I figured it wasn't the right approach. Perhaps a different error or none at all if Authenticate is called with those fields already populated?
The correct way to call it is like this. Calling Authenticate means get a new token now please!
I'm currently working on this CLI used to interact with SoftLayer Object Storage, specifically on IBM Bluemix.
To get a Connection object, I need to authenticate with each command. This requires a couple of requests to bluemix.net unless I have my Object Storage service credentials saved locally. If I'm not caching creds, it takes ~5-8 seconds for each command. And I often find myself having to string commands together, so those seconds add up fast.
I'm not thrilled about caching service credentials that don't change, and would feel a lot better about storing the expiring Auth Token and taking the longer time to get a new one as needed. Is there currently a way for me to get an active Connection object with just my Auth Token and Storage URL or can I only obtain one with the service credentials?
Thanks!
The text was updated successfully, but these errors were encountered: