@@ -145,7 +145,7 @@ describe('CheckAuthService', () => {
145145 it (
146146 'returns isAuthenticated: false with error message when config is not valid' ,
147147 waitForAsync ( ( ) => {
148- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( false ) ;
148+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( false ) ;
149149 checkAuthService . checkAuth ( 'configId' ) . subscribe ( ( result ) =>
150150 expect ( result ) . toEqual ( {
151151 isAuthenticated : false ,
@@ -162,7 +162,7 @@ describe('CheckAuthService', () => {
162162 it (
163163 'returns null and sendMessageToMainWindow if currently in a popup' ,
164164 waitForAsync ( ( ) => {
165- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
165+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
166166 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' } ) ;
167167 spyOn ( popUpService , 'isCurrentlyInPopup' ) . and . returnValue ( true ) ;
168168 const popupSpy = spyOn ( popUpService , 'sendMessageToMainWindow' ) ;
@@ -176,7 +176,7 @@ describe('CheckAuthService', () => {
176176 it (
177177 'returns isAuthenticated: false with error message in case handleCallbackAndFireEvents throws an error' ,
178178 waitForAsync ( ( ) => {
179- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
179+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
180180 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' , configId : 'configId' } ) ;
181181 spyOn ( callBackService , 'isCallback' ) . and . returnValue ( true ) ;
182182 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -198,7 +198,7 @@ describe('CheckAuthService', () => {
198198 it (
199199 'calls callbackService.handlePossibleStsCallback with current url when callback is true' ,
200200 waitForAsync ( ( ) => {
201- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
201+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
202202 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' , configId : 'configId' } ) ;
203203 spyOn ( callBackService , 'isCallback' ) . and . returnValue ( true ) ;
204204 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -213,7 +213,7 @@ describe('CheckAuthService', () => {
213213 it (
214214 'does NOT call handleCallbackAndFireEvents with current url when callback is false' ,
215215 waitForAsync ( ( ) => {
216- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
216+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
217217 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' , configId : 'configId' } ) ;
218218 spyOn ( callBackService , 'isCallback' ) . and . returnValue ( false ) ;
219219 const spy = spyOn ( callBackService , 'handleCallbackAndFireEvents' ) . and . returnValue ( of ( null ) ) ;
@@ -227,7 +227,7 @@ describe('CheckAuthService', () => {
227227 it (
228228 'does fire the auth and user data events when it is not a callback from the security token service and is authenticated' ,
229229 waitForAsync ( ( ) => {
230- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
230+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
231231 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' , configId : 'configId' } ) ;
232232 spyOn ( callBackService , 'isCallback' ) . and . returnValue ( false ) ;
233233 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -246,7 +246,7 @@ describe('CheckAuthService', () => {
246246 it (
247247 'does NOT fire the auth and user data events when it is not a callback from the security token service and is NOT authenticated' ,
248248 waitForAsync ( ( ) => {
249- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
249+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
250250 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' , configId : 'configId' } ) ;
251251 spyOn ( callBackService , 'isCallback' ) . and . returnValue ( false ) ;
252252 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( false ) ;
@@ -265,7 +265,7 @@ describe('CheckAuthService', () => {
265265 it (
266266 'if authenticated return true' ,
267267 waitForAsync ( ( ) => {
268- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
268+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
269269 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' , configId : 'configId' } ) ;
270270 spyOn ( callBackService , 'handleCallbackAndFireEvents' ) . and . returnValue ( of ( null ) ) ;
271271 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -279,7 +279,7 @@ describe('CheckAuthService', () => {
279279 it (
280280 'if authenticated set auth and fires event ' ,
281281 waitForAsync ( ( ) => {
282- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
282+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
283283 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' } ) ;
284284 spyOn ( callBackService , 'handleCallbackAndFireEvents' ) . and . returnValue ( of ( null ) ) ;
285285 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -295,7 +295,7 @@ describe('CheckAuthService', () => {
295295 it (
296296 'if authenticated publishUserdataIfExists' ,
297297 waitForAsync ( ( ) => {
298- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
298+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
299299 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' } ) ;
300300 spyOn ( callBackService , 'handleCallbackAndFireEvents' ) . and . returnValue ( of ( null ) ) ;
301301 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -315,7 +315,7 @@ describe('CheckAuthService', () => {
315315 authority : 'authority' ,
316316 tokenRefreshInSeconds : 7 ,
317317 } ;
318- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
318+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
319319 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( config ) ;
320320 spyOn ( callBackService , 'handleCallbackAndFireEvents' ) . and . returnValue ( of ( null ) ) ;
321321 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -331,7 +331,7 @@ describe('CheckAuthService', () => {
331331 it (
332332 'if isCheckSessionConfigured call checkSessionService.start()' ,
333333 waitForAsync ( ( ) => {
334- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
334+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
335335 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' } ) ;
336336 spyOn ( callBackService , 'handleCallbackAndFireEvents' ) . and . returnValue ( of ( null ) ) ;
337337 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -348,7 +348,7 @@ describe('CheckAuthService', () => {
348348 it (
349349 'if isSilentRenewConfigured call getOrCreateIframe()' ,
350350 waitForAsync ( ( ) => {
351- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
351+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
352352 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' } ) ;
353353 spyOn ( callBackService , 'handleCallbackAndFireEvents' ) . and . returnValue ( of ( null ) ) ;
354354 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -365,7 +365,7 @@ describe('CheckAuthService', () => {
365365 it (
366366 'calls checkSavedRedirectRouteAndNavigate if authenticated' ,
367367 waitForAsync ( ( ) => {
368- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
368+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
369369 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' , configId : 'configId' } ) ;
370370 spyOn ( callBackService , 'handleCallbackAndFireEvents' ) . and . returnValue ( of ( null ) ) ;
371371 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -381,7 +381,7 @@ describe('CheckAuthService', () => {
381381 it (
382382 'does not call checkSavedRedirectRouteAndNavigate if not authenticated' ,
383383 waitForAsync ( ( ) => {
384- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
384+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
385385 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' , configId : 'configId' } ) ;
386386 spyOn ( callBackService , 'handleCallbackAndFireEvents' ) . and . returnValue ( of ( null ) ) ;
387387 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( false ) ;
@@ -398,7 +398,7 @@ describe('CheckAuthService', () => {
398398 it (
399399 'if isSilentRenewConfigured call getOrCreateIframe()' ,
400400 waitForAsync ( ( ) => {
401- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
401+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
402402 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' } ) ;
403403 spyOn ( callBackService , 'handleCallbackAndFireEvents' ) . and . returnValue ( of ( null ) ) ;
404404 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( true ) ;
@@ -415,7 +415,7 @@ describe('CheckAuthService', () => {
415415 it (
416416 'does forceRefreshSession get called and is NOT authenticated' ,
417417 waitForAsync ( ( ) => {
418- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
418+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
419419 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' } ) ;
420420 spyOn ( callBackService , 'isCallback' ) . and . returnValue ( false ) ;
421421 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( false ) ;
@@ -440,7 +440,7 @@ describe('CheckAuthService', () => {
440440 it (
441441 'should start check session and validation after forceRefreshSession has been called and is authenticated after forcing with silentrenew' ,
442442 waitForAsync ( ( ) => {
443- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
443+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
444444 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' } ) ;
445445 spyOn ( callBackService , 'isCallback' ) . and . returnValue ( false ) ;
446446 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( false ) ;
@@ -473,7 +473,7 @@ describe('CheckAuthService', () => {
473473 it (
474474 'should start check session and validation after forceRefreshSession has been called and is authenticated after forcing without silentrenew' ,
475475 waitForAsync ( ( ) => {
476- spyOn ( configurationProvider , 'hasAsLeastOneConfig ' ) . and . returnValue ( true ) ;
476+ spyOn ( configurationProvider , 'hasAtLeastOneConfig ' ) . and . returnValue ( true ) ;
477477 spyOn ( configurationProvider , 'getOpenIDConfiguration' ) . and . returnValue ( { authority : 'authority' } ) ;
478478 spyOn ( callBackService , 'isCallback' ) . and . returnValue ( false ) ;
479479 spyOn ( authStateService , 'areAuthStorageTokensValid' ) . and . returnValue ( false ) ;
0 commit comments