diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-07 12:42:33 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-07 12:42:33 +0100 |
commit | ab6696e855b58cdb2b6264c9acb0397dd7384e25 (patch) | |
tree | 516e8c8f3a574e669d9f5b192655c54a7bcda38b /app/views/doorkeeper/applications/show.html.erb | |
parent | 3824c588533f481011d2be19ff9476c001ffbee9 (diff) |
Adding doorkeeper, adding a REST API
POST /api/statuses Params: status (text contents), in_reply_to_id (optional) GET /api/statuses/:id POST /api/statuses/:id/reblog GET /api/accounts/:id GET /api/accounts/:id/following GET /api/accounts/:id/followers POST /api/accounts/:id/follow POST /api/accounts/:id/unfollow POST /api/follows Params: uri (e.g. user@domain) OAuth authentication is currently disabled, but the API can be used with HTTP Auth.
Diffstat (limited to 'app/views/doorkeeper/applications/show.html.erb')
-rw-r--r-- | app/views/doorkeeper/applications/show.html.erb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/app/views/doorkeeper/applications/show.html.erb b/app/views/doorkeeper/applications/show.html.erb new file mode 100644 index 000000000..ac89f32b1 --- /dev/null +++ b/app/views/doorkeeper/applications/show.html.erb @@ -0,0 +1,39 @@ +<div class="page-header"> + <h1><%= t('.title', name: @application.name) %></h1> +</div> + +<div class="row"> + <div class="col-md-8"> + <h4><%= t('.application_id') %>:</h4> + <p><code id="application_id"><%= @application.uid %></code></p> + + <h4><%= t('.secret') %>:</h4> + <p><code id="secret"><%= @application.secret %></code></p> + + <h4><%= t('.scopes') %>:</h4> + <p><code id="scopes"><%= @application.scopes %></code></p> + + <h4><%= t('.callback_urls') %>:</h4> + + <table> + <% @application.redirect_uri.split.each do |uri| %> + <tr> + <td> + <code><%= uri %></code> + </td> + <td> + <%= link_to t('doorkeeper.applications.buttons.authorize'), oauth_authorization_path(client_id: @application.uid, redirect_uri: uri, response_type: 'code'), class: 'btn btn-success', target: '_blank' %> + </td> + </tr> + <% end %> + </table> + </div> + + <div class="col-md-4"> + <h3><%= t('.actions') %></h3> + + <p><%= link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(@application), class: 'btn btn-primary' %></p> + + <p><%= render 'delete_form', application: @application, submit_btn_css: 'btn btn-danger' %></p> + </div> +</div> |