2019-02-13 22:33:22 +00:00
|
|
|
<%= if get_flash(@conn, :info) do %>
|
2018-02-08 16:57:30 +00:00
|
|
|
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
|
2019-02-13 22:33:22 +00:00
|
|
|
<% end %>
|
|
|
|
<%= if get_flash(@conn, :error) do %>
|
2018-02-08 16:57:30 +00:00
|
|
|
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
|
2019-02-13 22:33:22 +00:00
|
|
|
<% end %>
|
2019-03-11 17:37:26 +00:00
|
|
|
|
2017-09-06 17:06:25 +00:00
|
|
|
<h2>OAuth Authorization</h2>
|
2019-03-11 17:37:26 +00:00
|
|
|
|
2017-09-06 17:06:25 +00:00
|
|
|
<%= form_for @conn, o_auth_path(@conn, :authorize), [as: "authorization"], fn f -> %>
|
2019-03-11 12:57:04 +00:00
|
|
|
<div class="input">
|
|
|
|
<%= label f, :name, "Name or email" %>
|
|
|
|
<%= text_input f, :name %>
|
|
|
|
</div>
|
|
|
|
<div class="input">
|
|
|
|
<%= label f, :password, "Password" %>
|
|
|
|
<%= password_input f, :password %>
|
|
|
|
</div>
|
2019-03-27 12:39:35 +00:00
|
|
|
|
2019-04-10 18:40:38 +00:00
|
|
|
<%= render @view_module, "_scopes.html", Map.merge(assigns, %{form: f}) %>
|
2019-02-13 21:29:29 +00:00
|
|
|
|
2017-09-06 17:06:25 +00:00
|
|
|
<%= hidden_input f, :client_id, value: @client_id %>
|
|
|
|
<%= hidden_input f, :response_type, value: @response_type %>
|
|
|
|
<%= hidden_input f, :redirect_uri, value: @redirect_uri %>
|
2019-04-04 19:41:03 +00:00
|
|
|
<%= hidden_input f, :state, value: @state %>
|
2017-09-06 17:06:25 +00:00
|
|
|
<%= submit "Authorize" %>
|
|
|
|
<% end %>
|
2019-03-11 17:37:26 +00:00
|
|
|
|
2019-04-05 12:12:02 +00:00
|
|
|
<%= if Pleroma.Config.oauth_consumer_enabled?() do %>
|
2019-03-27 12:39:35 +00:00
|
|
|
<%= render @view_module, Pleroma.Web.Auth.Authenticator.oauth_consumer_template(), assigns %>
|
2019-03-15 14:08:03 +00:00
|
|
|
<% end %>
|