ngx-sp-auth 4.23.7 → 4.23.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -830,7 +830,7 @@ class AuthStorageService {
830
830
  }
831
831
  verifyToken() {
832
832
  const url = `${this._BASE_VERIFICATION_URL}`;
833
- const headers = this._HTTP_HEADERS;
833
+ const headers = this._HTTP_HEADERS.set('x-application', this._customEnvironmentService.product);
834
834
  return defer(() => {
835
835
  this._toastr.info('Validando token do usuário.', 'Aguarde...', { timeOut: 3000, progressBar: true, progressAnimation: 'increasing', closeButton: true });
836
836
  const params = new HttpParams()
@@ -4775,7 +4775,8 @@ class AuthAplicInterceptor {
4775
4775
  // Verifica se o Token precisa ser renovado
4776
4776
  // await this._authStorage.renewToken();
4777
4777
  // Adiciona as autenticações necessárias ao servidor.
4778
- changedReq = req.clone({ headers: req.headers, withCredentials: true });
4778
+ let clonedHeaders = req.headers.set('X-Application', this._customEnvironmentService.product);
4779
+ changedReq = req.clone({ headers: clonedHeaders, withCredentials: true });
4779
4780
  }
4780
4781
  // return await lastValueFrom(next.handle(changedReq));
4781
4782
  // Exemplo de leitura de resposta via interceptor abaixo:
@@ -4809,8 +4810,9 @@ class AuthInfraInterceptor {
4809
4810
  intercept(req, next) {
4810
4811
  let changedReq = req;
4811
4812
  if (this._authCheckService.needsAuthRequest(req.url, req.method, this._customEnvironmentService.needsAuthInfra)) {
4813
+ let clonedHeaders = req.headers.set('X-Application', this._customEnvironmentService.product);
4812
4814
  // Adiciona as autenticações necessárias ao servidor. Autenticação básica.
4813
- changedReq = req.clone({ headers: req.headers, withCredentials: true });
4815
+ changedReq = req.clone({ headers: clonedHeaders, withCredentials: true });
4814
4816
  }
4815
4817
  // return next.handle(changedReq);
4816
4818
  // Exemplo de leitura de resposta via interceptor abaixo: