-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/euphoria' into baseline/main_202…
…30720 # Conflicts: # src/app/core/services/common.service.ts # src/app/pages/fee-grant/fee-grant.module.ts # src/app/pages/fee-grant/my-grantees/my-grantees.component.ts # src/app/pages/fee-grant/my-granters/my-granters.component.ts # src/app/shared/components/a-paginator/a-paginator.component.scss
- Loading branch information
Showing
261 changed files
with
7,945 additions
and
6,397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,18 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { | ||
HttpRequest, | ||
HttpHandler, | ||
HttpEvent, | ||
HttpInterceptor, | ||
} from '@angular/common/http'; | ||
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http'; | ||
import { Observable } from 'rxjs'; | ||
|
||
import { AuthenticationService } from '../services/auth.service'; | ||
|
||
@Injectable() | ||
export class JwtInterceptor implements HttpInterceptor { | ||
constructor( | ||
private authenticationService: AuthenticationService, | ||
) { } | ||
constructor(private authenticationService: AuthenticationService) {} | ||
|
||
intercept( | ||
request: HttpRequest<any>, | ||
next: HttpHandler | ||
): Observable<HttpEvent<any>> { | ||
const currentUser = this.authenticationService.currentUserValue; | ||
if (currentUser && currentUser.data && currentUser.data.access_token) { | ||
request = request.clone({ | ||
setHeaders: { | ||
Authorization: `Bearer ${currentUser.data.access_token}`, | ||
}, | ||
}); | ||
} | ||
return next.handle(request); | ||
} | ||
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { | ||
const currentUser = this.authenticationService.currentUserValue; | ||
request = request.clone({ | ||
setHeaders: { | ||
}, | ||
}); | ||
return next.handle(request); | ||
} | ||
} |
Oops, something went wrong.