File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
use Illuminate \Support \ServiceProvider ;
4
4
use Auth0 \SDK \API \ApiClient ;
5
+ use Auth0 \SDK \API \InformationHeaders ;
5
6
6
7
class LoginServiceProvider extends ServiceProvider {
7
8
8
- const SDK_VERSION = "2.1.1 " ;
9
+ const SDK_VERSION = "2.1.2 " ;
9
10
10
11
/**
11
12
* Indicates if loading of the provider is deferred.
@@ -37,8 +38,18 @@ public function boot()
37
38
]);
38
39
39
40
$ laravel = app ();
40
- ApiClient::addHeaderInfoMeta ('Laravel: ' .$ laravel ::VERSION );
41
- ApiClient::addHeaderInfoMeta ('SDK: ' .self ::SDK_VERSION );
41
+
42
+ $ oldInfoHeaders = ApiClient::getInfoHeadersData ();
43
+
44
+ if ($ oldInfoHeaders ) {
45
+ $ infoHeaders = InformationHeaders::Extend ($ oldInfoHeaders );
46
+
47
+ $ infoHeaders ->setEnvironment ('Laravel ' , $ laravel ::VERSION );
48
+ $ infoHeaders ->setPackage ('laravel-auth0 ' , self ::SDK_VERSION );
49
+
50
+ ApiClient::setInfoHeadersData ($ infoHeaders );
51
+ }
52
+
42
53
}
43
54
44
55
/**
You can’t perform that action at this time.
0 commit comments