${_('Authentication Tokens')}

${_('Each token can have a role. Token with a role can be used only in given context, ' 'e.g. VCS tokens can be used together with the authtoken auth plugin for git/hg/svn operations only.')} ${_('Additionally scope for VCS type token can narrow the use to chosen repository.')}

%if c.user_auth_tokens: %for auth_token in c.user_auth_tokens: %endfor %else: %endif
${_('Token')} ${_('Scope')} ${_('Description')} ${_('Role')} ${_('Expiration')} ${_('Action')}
${auth_token.api_key}
${auth_token.scope_humanized} ${auth_token.description} ${auth_token.role_humanized} %if auth_token.expires == -1: ${_('never')} %else: %if auth_token.expired: ${h.age_component(h.time_to_utcdatetime(auth_token.expires))} %else: ${h.age_component(h.time_to_utcdatetime(auth_token.expires))} %endif %endif ${h.secure_form(h.route_path('my_account_auth_tokens_delete'), method='post')} ${h.hidden('del_auth_token',auth_token.api_key)} ${h.end_form()}
${_('No additional auth token specified')}
${h.secure_form(h.route_path('my_account_auth_tokens_add'), method='post')}
${h.text('description', placeholder=_('Description'))} ${h.select('lifetime', '', c.lifetime_options)} ${h.select('role', '', c.role_options)}
${h.submit('save',_('Add'),class_="btn")} ${h.reset('reset',_('Reset'),class_="btn")}
${h.end_form()}