Drop support for OAuth 1
This commit is contained in:
parent
cee9818dfc
commit
17bc0853a0
48 changed files with 52 additions and 2395 deletions
|
@ -5,9 +5,6 @@
|
|||
<li class="nav-item">
|
||||
<%= link_to t(".account_settings"), edit_account_path, :class => "nav-link #{'active' if %w[accounts deletions].include?(controller_name)}" %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to t(".oauth1_settings"), oauth_clients_path(current_user), :class => "nav-link #{'active' if controller_name == 'oauth_clients'}" %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to t(".oauth2_applications"), oauth_applications_path, :class => "nav-link #{'active' if controller_name == 'oauth2_applications'}" %>
|
||||
</li>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".title" %></h1>
|
||||
<% end %>
|
||||
|
||||
<p><%= t(".request_access_html", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(current_user.display_name, current_user)) %></p>
|
||||
|
||||
<%= bootstrap_form_tag do |f| %>
|
||||
<%= f.hidden_field :oauth_token, :value => @token.token %>
|
||||
<% if params[:oauth_callback] -%>
|
||||
<%= f.hidden_field :oauth_callback, :value => params[:oauth_callback] %>
|
||||
<% end -%>
|
||||
<%= f.form_group :permissions, :label => { :text => t(".allow_to") } do %>
|
||||
<% @token.client_application.permissions.each do |perm| -%>
|
||||
<%= f.check_box perm, :value => "yes", :checked => @token.read_attribute(perm), :label => t(".#{perm}") %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<%= f.primary t(".grant_access") %>
|
||||
<% end %>
|
|
@ -1,5 +0,0 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".title" %></h1>
|
||||
<% end %>
|
||||
|
||||
<p><%= @message %></p>
|
|
@ -1,9 +0,0 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".title" %></h1>
|
||||
<% end %>
|
||||
|
||||
<p><%= t(".allowed_html", :app_name => link_to(@token.client_application.name, @token.client_application.url)) %></p>
|
||||
|
||||
<% if @token.oob? and not @token.oauth10? %>
|
||||
<p><%= t ".verification", :code => @token.verifier %></p>
|
||||
<% end %>
|
|
@ -1,11 +0,0 @@
|
|||
<%= f.text_field :name %>
|
||||
<%= f.text_field :url %>
|
||||
<%= f.text_field :callback_url %>
|
||||
<%= f.text_field :support_url %>
|
||||
<div class='mb-3'>
|
||||
<p><%= t ".requests" %></p>
|
||||
<% ClientApplication.all_permissions.each do |perm| %>
|
||||
<%= f.check_box perm %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.primary %>
|
|
@ -1,9 +0,0 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".title" %></h1>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "settings_menu" %>
|
||||
|
||||
<%= bootstrap_form_for @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<% end %>
|
|
@ -1,47 +0,0 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".title" %></h1>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "settings_menu" %>
|
||||
|
||||
<% unless @tokens.empty? %>
|
||||
<h3><%= t ".my_tokens" %></h3>
|
||||
<p><%= t ".list_tokens" %></p>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t ".application" %></th>
|
||||
<th><%= t ".issued_at" %></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<% @tokens.each do |token| %>
|
||||
<tr>
|
||||
<td><%= link_to token.client_application.name, token.client_application.url %></td>
|
||||
<td><%= token.authorized_at %></td>
|
||||
<td>
|
||||
<%= form_tag({ :controller => "oauth", :action => "revoke" }) do %>
|
||||
<%= hidden_field_tag "token", token.token, :autocomplete => "off" %>
|
||||
<%= submit_tag t(".revoke"), :class => "btn btn-sm btn-primary" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% end %>
|
||||
<h3><%= t ".my_apps" %></h3>
|
||||
<% if @client_applications.empty? %>
|
||||
<p><%= t(".no_apps_html", :oauth => link_to(t(".oauth"), "https://oauth.net")) %></p>
|
||||
<% else %>
|
||||
<p><%= t ".registered_apps" %></p>
|
||||
<ul>
|
||||
<% @client_applications.each do |client| %>
|
||||
<li class="client_application">
|
||||
<%= link_to client.name, :action => :show, :id => client.id %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% if Settings.oauth_10_registration -%>
|
||||
<%= link_to t(".register_new"), { :action => :new }, :class => "btn btn-outline-primary" %>
|
||||
<% end -%>
|
|
@ -1,9 +0,0 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".title" %></h1>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "settings_menu" %>
|
||||
|
||||
<%= bootstrap_form_for @client_application, :url => { :action => :create } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<% end %>
|
|
@ -1 +0,0 @@
|
|||
<p><%= t('.sorry', :type => @type) %></p>
|
|
@ -1,33 +0,0 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t(".title", :app_name => @client_application.name) %></h1>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "settings_menu" %>
|
||||
|
||||
<dl class="row">
|
||||
<dt class="col-sm-3"><%= t ".key" %></dt>
|
||||
<dd class="col-sm-9"><%= @client_application.key %></dt>
|
||||
<dt class="col-sm-3"><%= t ".secret" %></dt>
|
||||
<dd class="col-sm-9"><%= @client_application.secret %></dd>
|
||||
<dt class="col-sm-3"><%= t ".url" %></dt>
|
||||
<dd class="col-sm-9">http<%= "s" if request.ssl? %>://<%= request.host_with_port %><%= @client_application.oauth_server.request_token_path %></dd>
|
||||
<dt class="col-sm-3"><%= t ".access_url" %></dt>
|
||||
<dd class="col-sm-9">http<%= "s" if request.ssl? %>://<%= request.host_with_port %><%= @client_application.oauth_server.access_token_path %></dd>
|
||||
<dt class="col-sm-3"><%= t ".authorize_url" %></dt>
|
||||
<dd class="col-sm-9">http<%= "s" if request.ssl? %>://<%= request.host_with_port %><%= @client_application.oauth_server.authorize_path %></dd>
|
||||
</dl>
|
||||
|
||||
<div>
|
||||
<p><%= t ".requests" %></p>
|
||||
<ul>
|
||||
<% @client_application.permissions.each do |perm| %>
|
||||
<li><%= t("activerecord.attributes.client_application.#{perm}") %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<p><%= t ".support_notice" %></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= link_to t(".edit"), edit_oauth_client_path(@client_application.user.display_name, @client_application), :method => :get, :class => "btn btn-outline-primary" %>
|
||||
<%= link_to t(".delete"), oauth_client_path(@client_application.user.display_name, @client_application), :method => :delete, :data => { :confirm => t(".confirm") }, :class => "btn btn-outline-danger" %>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue