@@ -22,12 +22,6 @@ class OAuth
22
22
*/
23
23
private $ _serviceFactory ;
24
24
25
- /**
26
- * Storege name from config
27
- * @var string
28
- */
29
- private $ _storage_name = 'Session ' ;
30
-
31
25
/**
32
26
* Client ID from config
33
27
* @var string
@@ -70,34 +64,18 @@ public function setConfig( $service )
70
64
// if config/oauth-4-laravel.php exists use this one
71
65
if ( Config::get ('oauth-4-laravel.consumers ' ) != null ) {
72
66
73
- $ this ->_storage_name = Config::get ('oauth-4-laravel.storage ' , 'Session ' );
74
67
$ this ->_client_id = Config::get ("oauth-4-laravel.consumers. $ service.client_id " );
75
68
$ this ->_client_secret = Config::get ("oauth-4-laravel.consumers. $ service.client_secret " );
76
69
$ this ->_scope = Config::get ("oauth-4-laravel.consumers. $ service.scope " , array () );
77
70
78
- // esle try to find config in packages configs
71
+ // else try to find config in packages configs
79
72
} else {
80
- $ this ->_storage_name = Config::get ('oauth-4-laravel::storage ' , 'Session ' );
81
73
$ this ->_client_id = Config::get ("oauth-4-laravel::consumers. $ service.client_id " );
82
74
$ this ->_client_secret = Config::get ("oauth-4-laravel::consumers. $ service.client_secret " );
83
75
$ this ->_scope = Config::get ("oauth-4-laravel::consumers. $ service.scope " , array () );
84
76
}
85
77
}
86
78
87
- /**
88
- * Create storage instance
89
- *
90
- * @param string $storageName
91
- * @return OAuth\Common\\Storage
92
- */
93
- public function createStorageInstance ($ storageName )
94
- {
95
- $ storageClass = "\\OAuth \\Common \\Storage \\$ storageName " ;
96
- $ storage = new $ storageClass ();
97
-
98
- return $ storage ;
99
- }
100
-
101
79
/**
102
80
* Set the http client object
103
81
*
@@ -122,7 +100,7 @@ public function consumer( $service, $url = null, $scope = null )
122
100
$ this ->setConfig ( $ service );
123
101
124
102
// get storage object
125
- $ storage = $ this -> createStorageInstance ( $ this -> _storage_name );
103
+ $ storage =
126
104
127
105
// create credentials object
128
106
$ credentials = new Credentials (
0 commit comments