1 <div af-api4-ctrl=
"tokens" af-api4=
"['OAuthSysToken', 'get', {'where': [['client_id', '=', options.clientId]]}]">
3 <div ng-if=
"tokens.result.length == 0">
4 {{ts('No tokens found')}}
7 <table class=
"table" ng-if=
"tokens.result.length > 0">
10 <th>{{ts('Tag')}}
</th>
11 <th>{{ts('On Behalf Of')}}
</th>
12 <th>{{ts('Scopes')}}
</th>
13 <th>{{ts('Created Date')}}
</th>
14 <th>{{ts('Actions')}}
</th>
16 <tr ng-repeat=
"token in tokens.result">
18 <td>{{token.tag}}
</td>
19 <td>{{token.resource_owner_name}}
</td>
20 <td>{{token.scopes.join(
" ")}}
</td>
21 <td>{{token.created_date}}
</td>
23 <div class=
"btn-group">
24 <a class=
"btn btn-default"
25 ng-if=
"token.access_token"
26 ng-href=
"{{crmUrl('civicrm/admin/oauth-jwt-debug#!/', {id: token.id})}}"
28 >{{ts('Inspect')}}
</a>
30 <a class=
"btn btn-danger"
31 af-api4-action=
"['OAuthSysToken', 'delete', {where: [['id', '=', token.id]]}]"
32 af-api4-start-msg=
"ts('Deleting...')"
33 af-api4-success-msg=
"ts('Deleted')"
34 af-api4-success=
"tokens.refresh()"