Browse Source

use result of super function. do not dublicate

pull/14140/head
Mahmut Gundogdu 4 years ago
parent
commit
405a38d11c
  1. 4
      npm/ng-packs/packages/core/src/lib/services/timeout-limited-oauth.service.ts

4
npm/ng-packs/packages/core/src/lib/services/timeout-limited-oauth.service.ts

@ -4,9 +4,7 @@ import { OAuthService } from 'angular-oauth2-oidc';
@Injectable()
export class TimeoutLimitedOAuthService extends OAuthService {
protected override calcTimeout(storedAt: number, expiration: number): number {
const now = this.dateTimeService.now();
const delta = (expiration - storedAt) * this.timeoutFactor - (now - storedAt);
const result = Math.max(0, delta);
const result = super.calcTimeout(storedAt, expiration);
const MAX_TIMEOUT_DURATION = 2147483647;
return result < MAX_TIMEOUT_DURATION ? result : MAX_TIMEOUT_DURATION - 1;
}

Loading…
Cancel
Save