mourningdove/views/oauth/index.tt
2026-05-24 01:03:05 +00:00

41 lines
1 KiB
Text

[%# oauth/index.tt
List all applications a user has authorized.
Authors:
Andrea Nall <anall@andreanall.com>
Copyright (c) 2015 by Dreamwidth Studios, LLC.
This program is free software; you may redistribute it and/or modify it under
the same terms as Perl itself. For a copy of the license, please reference
'perldoc perlartistic' or 'perldoc perlgpl'.
%]
[% IF viewother %]
<p>Viewing authorizations for [% view_u.ljuser_display %].</p>
[% END %]
[% IF tokens.count == 0 %]
You have no authorizations.
[% ELSE %]
<table class="table">
<thead>
<tr>
<th>Application</th>
<th>Created</th>
<th>Last Access</th>
</tr>
</thead>
<tbody>
[% FOR token IN tokens %]
<tr>
<td><a href="[% dw.create_url("/oauth/token/$token.consumer.id",
keep_args => ( viewother ? [ 'user' ] : 0 ) )%]">[% token.consumer.name | html %]</a>
[%- UNLESS token.usable %]<strong> [ Inactive ]</strong>[% END -%]</td>
<td>[% token.createtime | time_to_http %]</td>
<td>[% token.lastaccess | time_to_http %]</td>
</tr>
[% END %]
</tbody>
</table>
[% END %]