Skip to content

Commit eb86f22

Browse files
okashoiShohei Okada
authored andcommitted
Rename config keys
1 parent 2014441 commit eb86f22

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/Okashoi/Laravel5ConohaObjectHandler/ObjectHandler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ObjectHandler
4242
*/
4343
public function __construct($tokenCacheKey = null)
4444
{
45-
$this->_client = new Client(['base_uri' => config('conoha.endpoint')]);
45+
$this->_client = new Client(['base_uri' => config('conoha.base_uri')]);
4646
$this->_tokenCacheKey = $tokenCacheKey;
4747
$this->_setToken();
4848
}
@@ -77,7 +77,7 @@ protected function _setToken()
7777
];
7878

7979
$response = $this->_client->post(
80-
config('conoha.auth_url'),
80+
config('conoha.auth_endpoint'),
8181
[
8282
'json' => $requestBody,
8383
]
@@ -87,7 +87,7 @@ protected function _setToken()
8787

8888
if (isset($this->_tokenCacheKey)) {
8989
// cache the token
90-
Cache::put('conoha_token', $responseBody->access->token, 60 * 24);
90+
Cache::put($this->_tokenCacheKey, $responseBody->access->token, 60 * 24);
9191
}
9292

9393
// set the token to properties
@@ -244,4 +244,4 @@ public function delete($containerName, $objectName)
244244
throw new \Exception('Failed to delete.', $e->getCode(), $e);
245245
}
246246
}
247-
}
247+
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
return [
4-
'tenant_id' => env('CONOHA_TENANT_ID'),
5-
'username' => env('CONOHA_USERNAME'),
6-
'password' => env('CONOHA_PASSWORD'),
7-
'endpoint' => env('CONOHA_ENDPOINT'),
8-
'auth_url' => env('CONOHA_AUTH_URL'),
4+
'tenant_id' => env('CONOHA_TENANT_ID'),
5+
'username' => env('CONOHA_USERNAME'),
6+
'password' => env('CONOHA_PASSWORD'),
7+
'base_uri' => env('CONOHA_BASE_URI'),
8+
'auth_endpoint' => env('CONOHA_AUTH_ENDPOINT'),
99
];

0 commit comments

Comments
 (0)