lib/onering/api.rb in onering-client-0.0.93 vs lib/onering/api.rb in onering-client-0.0.94

- old
+ new

@@ -318,11 +318,11 @@ # ----------------------------------------------------------------------------- def _setup_auth_token() Onering::Logger.info("Using token authentication mechanism", "Onering::API") # get first keyfile found - key = Onering::Config.get('authentication.key') - raise Errors::AuthenticationMissing.new("Cannot find an API token") if key.nil? + key = Onering::Config.get('authentication.key', Onering::Config.get('authentication.keyfile')) + raise Errors::AuthenticationMissing.new("Token authentication specified, but cannot find a token config or as a command line argument") if key.nil? # set auth mechanism Onering::API.headers({ 'X-Auth-Mechanism' => 'token' }) \ No newline at end of file