File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
src/Okashoi/Laravel5ConohaObjectHandler Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff line change 11<?php
22
33return [
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];
You can’t perform that action at this time.
0 commit comments