templates/oauth_tokens.str in rodauth-oauth-0.7.4 vs templates/oauth_tokens.str in rodauth-oauth-0.8.0

- old
+ new

@@ -5,35 +5,33 @@ else <<-HTML <table class="table"> <thead> <tr> - <th scope="col">Token</th> - <th scope="col">Refresh Token</th> - <th scope="col">Expires in</th> - <th scope="col">Revoked at</th> - <th scope="col">Scopes</th> + <th scope="col">#{rodauth.oauth_applications_name_label}</th> + <th scope="col">#{rodauth.oauth_tokens_token_label}</th> + <th scope="col">#{rodauth.oauth_tokens_refresh_token_label}</th> + <th scope="col">#{rodauth.oauth_tokens_expires_in_label}</th> + <th scope="col">#{rodauth.oauth_tokens_scopes_label}</th> <th scope="col"><span class="badge badge-pill badge-dark">#{@oauth_tokens.count}</span> </tr> </thead> <tbody> #{ @oauth_tokens.map do |oauth_token| <<-HTML <tr> + <td>#{oauth_token[rodauth.oauth_applications_name_column]}</td> <td><code class="token">#{oauth_token[rodauth.oauth_tokens_token_column]}</code></td> <td><code class="token">#{oauth_token[rodauth.oauth_tokens_refresh_token_column]}</code></td> <td>#{oauth_token[rodauth.oauth_tokens_expires_in_column]}</td> - <td>#{oauth_token[rodauth.oauth_tokens_revoked_at_column]}</td> <td>#{oauth_token[rodauth.oauth_tokens_scopes_column]}</td> <td> #{ - if !oauth_token[rodauth.oauth_tokens_revoked_at_column] && !oauth_token[rodauth.oauth_tokens_token_hash_column] + if !oauth_token[rodauth.oauth_tokens_token_hash_column] <<-HTML - <form method="post" action="#{rodauth.revoke_path}" class="form-horizontal" role="form" id="revoke-form"> - #{csrf_tag(rodauth.revoke_path) if respond_to?(:csrf_tag)} - #{rodauth.input_field_string("token_type_hint", "revoke-token-type-hint", :value => "access_token", :type=>"hidden")} - #{rodauth.input_field_string("token", "revoke-token", :value => oauth_token[rodauth.oauth_tokens_token_column], :type=>"hidden")} + <form method="post" action="#{rodauth.oauth_token_path(oauth_token[rodauth.oauth_tokens_id_column])}" class="form-horizontal" role="form" id="token-revoke-form"> + #{csrf_tag(rodauth.oauth_token_path(oauth_token[rodauth.oauth_tokens_id_column])) if respond_to?(:csrf_tag)} #{rodauth.button(rodauth.oauth_token_revoke_button)} </form> HTML end }