Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('jwt-interceptor', () => {
// tslint:disable
const validJWTValue = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjZXJlbWEuZnIiLCJpYXQiOjE1MzIzNTA4MDAsImV4cCI6MjUzMjM1MDgwMCwic3ViIjoiQWxhaW4gQ0hBUkxFUyIsImFkbWluIjp0cnVlfQ.Rgkgb4KvxY2wp2niXIyLJNJeapFp9z3tCF-zK6Omc8c';
const validJWTToken = new NbAuthJWTToken(validJWTValue, 'dummy');
const expiredJWTToken = new NbAuthJWTToken('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzY290Y2guaW8iLCJleHAiOjEzMDA4MTkzODAsIm5hbWUiOiJDaHJpcyBTZXZpbGxlamEiLCJhZG1pbiI6dHJ1ZX0.03f329983b86f7d9a9f5fef85305880101d5e302afafa20154d094b229f75773','dummy');
const authHeader = 'Bearer ' + validJWTValue;
let authService: NbAuthService;
let tokenService: NbTokenService;
let dummyAuthStrategy: NbDummyAuthStrategy;
let http: HttpClient;
let httpMock: HttpTestingController;
function filterInterceptorRequest(req: HttpRequest): boolean {
return ['/filtered/url']
.some(url => req.url.includes(url));
}
beforeEach(() => {
TestBed.configureTestingModule({
describe('jwt-interceptor', () => {
// tslint:disable
const validJWTValue = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjZXJlbWEuZnIiLCJpYXQiOjE1MzIzNTA4MDAsImV4cCI6MjUzMjM1MDgwMCwic3ViIjoiQWxhaW4gQ0hBUkxFUyIsImFkbWluIjp0cnVlfQ.Rgkgb4KvxY2wp2niXIyLJNJeapFp9z3tCF-zK6Omc8c';
const validJWTToken = new NbAuthJWTToken(validJWTValue, 'dummy');
const expiredJWTToken = new NbAuthJWTToken('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzY290Y2guaW8iLCJleHAiOjEzMDA4MTkzODAsIm5hbWUiOiJDaHJpcyBTZXZpbGxlamEiLCJhZG1pbiI6dHJ1ZX0.03f329983b86f7d9a9f5fef85305880101d5e302afafa20154d094b229f75773','dummy');
const authHeader = 'Bearer ' + validJWTValue;
let authService: NbAuthService;
let tokenService: NbTokenService;
let dummyAuthStrategy: NbDummyAuthStrategy;
let http: HttpClient;
let httpMock: HttpTestingController;
function filterInterceptorRequest(req: HttpRequest): boolean {
return ['/filtered/url']
.some(url => req.url.includes(url));
}
beforeEach(() => {