open-vault/ui/app/templates/components/token-expire-warning.hbs
Chelsea Shaw 1f6329b1c2
UI/OIDC provider (#12800)
* Add new route w/ controller oidc-provider

* oidc-provider controller has params, template has success message (temporary), model requests correct endpoint

* Move oidc-provider route to under identity

* Do not redirect after poll if on oidc-provider page

* WIP provider -- beforeModel handles prompt, logout, redirect

* Auth service fetch method rejects with fetch response if status >= 300

* New component OidcConsentBlock

* Fix redirect to/from auth with cluster name, show error and consent form if applicable

* Show error and consent form on template

* Add component test, update docs

* Test for oidc-consent-block component

* Add changelog

* fix tests

* Add authorize to end of router path

* Remove unused tests

* Update changelog with feature name

* Add descriptions for OidcConsentBlock component

* glimmerize token-expire-warning and don't override yield if on oidc-provider route

* remove text on token-expire-warning

* Fix null transition.to on cluster redirect

* Hide nav links if oidc-provider route
2021-10-13 15:04:39 -05:00

16 lines
474 B
Handlebars

{{#if (and this.showWarning (is-after (now interval=1000) @expirationDate))}}
<div class="token-expire-warning">
<AlertBanner
@type="danger"
@message="Your auth token expired on
{{date-format @expirationDate "MMMM do yyyy, h:mm:ss a"}}
. You will need to re-authenticate."
>
<LinkTo @route="vault.cluster.logout" class="button link">
Reauthenticate
</LinkTo>
</AlertBanner>
</div>
{{else}}
{{yield}}
{{/if}}