File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @confluentinc/schemaregistry" ,
3- "version" : " v0.1.17.4 -devel" ,
3+ "version" : " v0.1.17.6 -devel" ,
44 "description" : " Node.js client for Confluent Schema Registry" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -101,10 +101,10 @@ export class RestService {
101101 delete this . client . defaults . auth ;
102102
103103 const headers = [ 'logicalCluster' , 'identityPoolId' ] ;
104- const missingHeaders = headers . find ( header => bearerAuthCredentials [ header as keyof typeof bearerAuthCredentials ] ) ;
104+ const missingHeader = headers . find ( header => ! ( header in bearerAuthCredentials ) ) ;
105105
106- if ( missingHeaders ) {
107- throw new Error ( `Bearer auth header '${ missingHeaders } ' not provided` ) ;
106+ if ( missingHeader ) {
107+ throw new Error ( `Bearer auth header '${ missingHeader } ' not provided` ) ;
108108 }
109109
110110 this . setHeaders ( {
@@ -127,14 +127,14 @@ export class RestService {
127127 'issuerEndpointUrl' ,
128128 'scope'
129129 ] ;
130- const missingField = requiredFields . find ( field => bearerAuthCredentials [ field as keyof typeof bearerAuthCredentials ] ) ;
130+ const missingField = requiredFields . find ( field => ! ( field in bearerAuthCredentials ) ) ;
131131
132132 if ( missingField ) {
133133 throw new Error ( `OAuth credential '${ missingField } ' not provided` ) ;
134134 }
135135 const issuerEndPointUrl = new URL ( bearerAuthCredentials . issuerEndpointUrl ! ) ;
136136 this . oauthClient = new OAuthClient ( bearerAuthCredentials . clientId ! , bearerAuthCredentials . clientSecret ! ,
137- issuerEndPointUrl . host , issuerEndPointUrl . pathname , bearerAuthCredentials . scope ! ) ;
137+ issuerEndPointUrl . origin , issuerEndPointUrl . pathname , bearerAuthCredentials . scope ! ) ;
138138 break ;
139139 default :
140140 throw new Error ( 'Invalid bearer auth credentials source' ) ;
You can’t perform that action at this time.
0 commit comments