Fix unable to fetch web service tokens in app

This commit is contained in:
Samuel Elliott 2025-08-01 22:41:31 +01:00
parent 116bae844a
commit d3e3ecd280
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6

View File

@ -627,10 +627,10 @@ export class NxapiZncaAuth {
}
get has_nsa_assertion_scope() {
return this.token?.result.scope ? !!this.token.result.scope.match(/\bca:ns\b/) :
return this.token?.result.scope ? !!this.token.result.scope.match(/\bca:na\b/) :
this.client_assertion_provider && !this.client_credentials ?
!!this.client_assertion_provider.scope.match(/\bca:ns\b/) :
this.client_credentials ? !!this.request_scope.match(/\bca:ns\b/) : false;
!!this.client_assertion_provider.scope.match(/\bca:na\b/) :
this.client_credentials ? !!this.request_scope.match(/\bca:na\b/) : false;
}
async getAccessToken(): Promise<TokenResponse> {