|
|
@@ -1,5 +1,6 @@
|
|
|
import { HttpService } from '@nestjs/axios';
|
|
|
import { BadRequestException, Injectable } from '@nestjs/common';
|
|
|
+import { readFileSync } from 'fs';
|
|
|
import { catchError, map, throwError } from 'rxjs';
|
|
|
|
|
|
@Injectable()
|
|
|
@@ -10,9 +11,10 @@ export class AuthService {
|
|
|
// private clientId = '4e728d65cf5b482ea81e56bf23a9ad8a';
|
|
|
private clientId = '754db2d1964d4f12ab312a2ab6f025ed';
|
|
|
// private clientSecret = 'dc547dbe-8d4b-4155-a378-f3a03d56a654';
|
|
|
- private clientSecret = '510c4b34-fd47-4f2d-ab89-9bc6db94e183';
|
|
|
+ private clientSecret = '';
|
|
|
|
|
|
constructor(private httpService: HttpService) {
|
|
|
+ this.clientSecret = JSON.parse(readFileSync("vault/idcs-client").toString()).clientSecret;
|
|
|
this.httpService.axiosRef.interceptors.request.use((config) => {
|
|
|
console.log('Request:', config);
|
|
|
return config;
|