2019-08-27 22:50:53 +00:00
|
|
|
<Confirm as |c|>
|
2018-05-25 15:36:23 +00:00
|
|
|
<div class="popup-menu-content">
|
|
|
|
<div class="box">
|
|
|
|
<div class="menu-label">
|
2018-04-03 14:16:57 +00:00
|
|
|
{{auth.authData.displayName}}
|
2018-05-25 15:36:23 +00:00
|
|
|
</div>
|
|
|
|
<nav class="menu">
|
|
|
|
<ul class="menu-list">
|
2018-11-05 16:56:59 +00:00
|
|
|
{{#if canExpire}}
|
|
|
|
<li class="action">
|
2018-11-14 00:55:07 +00:00
|
|
|
<AlertBanner @type="warning" @message="We've stopped auto-renewing your token due to inactivity.
|
|
|
|
It will expire in {{date-from-now auth.tokenExpirationDate interval=1000 hideSuffix=true}}.
|
|
|
|
on {{date-format auth.tokenExpirationDate 'MMMM Do YYYY, h:mm:ss a'}}" />
|
2018-11-05 16:56:59 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
2019-05-17 17:29:21 +00:00
|
|
|
<li class="action">
|
|
|
|
<button type="button" class="link" onclick={{action "restartGuide"}}>
|
|
|
|
Restart guide
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li class="action">
|
|
|
|
<CopyButton @clipboardText={{auth.currentToken}} class="link" @buttonType="button" @success={{action (set-flash-message 'Token copied!')}}>
|
|
|
|
Copy token
|
|
|
|
</CopyButton>
|
|
|
|
</li>
|
2018-05-25 15:36:23 +00:00
|
|
|
{{#if (is-before (now interval=1000) auth.tokenExpirationDate)}}
|
|
|
|
{{#if auth.authData.renewable}}
|
|
|
|
<li class="action">
|
|
|
|
<button type="button" {{action "renewToken"}} class="link button {{if isRenewing 'is-loading'}}">
|
|
|
|
Renew token
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li class="action">
|
2019-08-27 22:50:53 +00:00
|
|
|
<c.Message
|
|
|
|
@id={{get auth 'authData.displayName'}}
|
|
|
|
@title={{concat "Revoke " (get auth 'authData.displayName') "?"}}
|
|
|
|
@onConfirm={{action "revokeToken"}}
|
|
|
|
@message="You will not be able to log in again with this token."
|
|
|
|
@triggerText="Revoke token"
|
|
|
|
@confirmButtonText='Revoke'
|
|
|
|
/>
|
2018-05-25 15:36:23 +00:00
|
|
|
</li>
|
|
|
|
{{else}}
|
|
|
|
<li class="action text-right">
|
2019-08-27 22:50:53 +00:00
|
|
|
<c.Message
|
|
|
|
@id={{get auth 'authData.displayName'}}
|
|
|
|
@title={{concat "Revoke " (get auth 'authData.displayName') "?"}}
|
|
|
|
@onConfirm={{action "revokeToken"}}
|
|
|
|
@message="You will not be able to log in again with this token."
|
|
|
|
@triggerText="Revoke token"
|
|
|
|
@confirmButtonText='Revoke'
|
|
|
|
/>
|
2018-05-25 15:36:23 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{/if}}
|
2019-01-17 22:36:54 +00:00
|
|
|
<li class="action">
|
2019-05-17 17:29:21 +00:00
|
|
|
{{#link-to "vault.cluster.logout" activeClusterName id="logout" class="is-destroy" invokeAction=onLinkClick}}
|
2018-05-25 15:36:23 +00:00
|
|
|
Sign out
|
2018-08-16 17:48:24 +00:00
|
|
|
{{/link-to}}
|
2018-05-25 15:36:23 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
2018-04-03 14:16:57 +00:00
|
|
|
</div>
|
2019-08-27 22:50:53 +00:00
|
|
|
</Confirm>
|