* Users are only authenticated against their password on login, and to retrieve a token. * Passwords are wiped from the app and cookies after login and token retrieval * Tokens are revoked at the end of the session/logout * If the user chooses the "remember me" option, the token is stored in the cookie * A user interface to revoke tokens will be added * Tokens correctly delete themselves on logout * API documentation updated for the new user-token endpoints * Added a Manage tokens tab to the user panel * Added bullet point about the token authentication for the API * Added tests for new endpoints and tests against authentication middleware
29 lines
904 B
Smarty
29 lines
904 B
Smarty
<div id='user-tokens'>
|
|
<div class='messages'></div>
|
|
<% if (ctx.tokens.length > 0) { %>
|
|
<div class="token-flex-container">
|
|
<div class="token-flex-row">
|
|
<div>Token</div>
|
|
<div>Actions</div>
|
|
</div>
|
|
<% _.each(ctx.tokens, function(token, index) { %>
|
|
<div class="token-flex-row">
|
|
<div><%= token.token %></div>
|
|
<div>
|
|
<form id='token<%= index %>'>
|
|
<input type='hidden' name='token' value='<%= token.token %>'/>
|
|
<input type='submit' value='Delete token'/>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<% }); %>
|
|
</div>
|
|
<% } else { %>
|
|
<h2>No Registered Tokens</h2>
|
|
<% } %>
|
|
<form id='create-token-form'>
|
|
<div class='buttons'>
|
|
<input type='submit' value='Create token'/>
|
|
</div>
|
|
</form>
|
|
</div>
|