2023-03-15 16:00:52 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2021-10-13 20:04:39 +00:00
|
|
|
import Component from '@glimmer/component';
|
|
|
|
import { inject as service } from '@ember/service';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2021-10-13 20:04:39 +00:00
|
|
|
export default class TokenExpireWarning extends Component {
|
|
|
|
@service router;
|
|
|
|
|
|
|
|
get showWarning() {
|
2022-11-09 23:15:31 +00:00
|
|
|
const currentRoute = this.router.currentRouteName;
|
2021-10-29 21:54:15 +00:00
|
|
|
if ('vault.cluster.oidc-provider' === currentRoute) {
|
2021-10-13 20:04:39 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return !!this.args.expirationDate;
|
|
|
|
}
|
|
|
|
}
|