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 1
1
{
2
2
"name" : " @confluentinc/schemaregistry" ,
3
- "version" : " v0.1.17.4 -devel" ,
3
+ "version" : " v0.1.17.6 -devel" ,
4
4
"description" : " Node.js client for Confluent Schema Registry" ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -101,10 +101,10 @@ export class RestService {
101
101
delete this . client . defaults . auth ;
102
102
103
103
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 ) ) ;
105
105
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` ) ;
108
108
}
109
109
110
110
this . setHeaders ( {
@@ -127,14 +127,14 @@ export class RestService {
127
127
'issuerEndpointUrl' ,
128
128
'scope'
129
129
] ;
130
- const missingField = requiredFields . find ( field => bearerAuthCredentials [ field as keyof typeof bearerAuthCredentials ] ) ;
130
+ const missingField = requiredFields . find ( field => ! ( field in bearerAuthCredentials ) ) ;
131
131
132
132
if ( missingField ) {
133
133
throw new Error ( `OAuth credential '${ missingField } ' not provided` ) ;
134
134
}
135
135
const issuerEndPointUrl = new URL ( bearerAuthCredentials . issuerEndpointUrl ! ) ;
136
136
this . oauthClient = new OAuthClient ( bearerAuthCredentials . clientId ! , bearerAuthCredentials . clientSecret ! ,
137
- issuerEndPointUrl . host , issuerEndPointUrl . pathname , bearerAuthCredentials . scope ! ) ;
137
+ issuerEndPointUrl . origin , issuerEndPointUrl . pathname , bearerAuthCredentials . scope ! ) ;
138
138
break ;
139
139
default :
140
140
throw new Error ( 'Invalid bearer auth credentials source' ) ;
You can’t perform that action at this time.
0 commit comments