@@ -1264,7 +1264,7 @@ export class OAuthService extends AuthConfig implements OnDestroy {
1264
1264
}
1265
1265
1266
1266
return url ;
1267
-
1267
+
1268
1268
}
1269
1269
1270
1270
initImplicitFlowInternal (
@@ -1374,8 +1374,7 @@ export class OAuthService extends AuthConfig implements OnDestroy {
1374
1374
public tryLogin ( options : LoginOptions = null ) : Promise < boolean > {
1375
1375
if ( this . config . responseType === 'code' ) {
1376
1376
return this . tryLoginCodeFlow ( ) . then ( _ => true ) ;
1377
- }
1378
- else {
1377
+ } else {
1379
1378
return this . tryLoginImplicitFlow ( options ) ;
1380
1379
}
1381
1380
}
@@ -1504,32 +1503,32 @@ export class OAuthService extends AuthConfig implements OnDestroy {
1504
1503
( tokenResponse ) => {
1505
1504
this . debug ( 'refresh tokenResponse' , tokenResponse ) ;
1506
1505
this . storeAccessTokenResponse (
1507
- tokenResponse . access_token ,
1508
- tokenResponse . refresh_token ,
1506
+ tokenResponse . access_token ,
1507
+ tokenResponse . refresh_token ,
1509
1508
tokenResponse . expires_in ,
1510
1509
tokenResponse . scope ) ;
1511
1510
1512
1511
if ( this . oidc && tokenResponse . id_token ) {
1513
- this . processIdToken ( tokenResponse . id_token , tokenResponse . access_token ) .
1512
+ this . processIdToken ( tokenResponse . id_token , tokenResponse . access_token ) .
1514
1513
then ( result => {
1515
1514
this . storeIdToken ( result ) ;
1516
-
1515
+
1517
1516
this . eventsSubject . next ( new OAuthSuccessEvent ( 'token_received' ) ) ;
1518
1517
this . eventsSubject . next ( new OAuthSuccessEvent ( 'token_refreshed' ) ) ;
1519
-
1518
+
1520
1519
resolve ( tokenResponse ) ;
1521
1520
} )
1522
1521
. catch ( reason => {
1523
1522
this . eventsSubject . next ( new OAuthErrorEvent ( 'token_validation_error' , reason ) ) ;
1524
1523
console . error ( 'Error validating tokens' ) ;
1525
1524
console . error ( reason ) ;
1526
-
1525
+
1527
1526
reject ( reason ) ;
1528
1527
} ) ;
1529
1528
} else {
1530
1529
this . eventsSubject . next ( new OAuthSuccessEvent ( 'token_received' ) ) ;
1531
1530
this . eventsSubject . next ( new OAuthSuccessEvent ( 'token_refreshed' ) ) ;
1532
-
1531
+
1533
1532
resolve ( tokenResponse ) ;
1534
1533
}
1535
1534
} ,
@@ -1689,7 +1688,7 @@ export class OAuthService extends AuthConfig implements OnDestroy {
1689
1688
) : boolean {
1690
1689
const savedNonce = this . _storage . getItem ( 'nonce' ) ;
1691
1690
if ( savedNonce !== nonceInState ) {
1692
-
1691
+
1693
1692
const err = 'Validating access_token failed, wrong state/nonce.' ;
1694
1693
console . error ( err , savedNonce , nonceInState ) ;
1695
1694
return false ;
0 commit comments