[#468] Defined OAuth restrictions for all applicable routes.
[akkoma] / lib / pleroma / web / templates / o_auth / o_auth / show.html.eex
1 <p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
2 <p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
3 <h2>OAuth Authorization</h2>
4 <%= form_for @conn, o_auth_path(@conn, :authorize), [as: "authorization"], fn f -> %>
5 <%= label f, :name, "Name or email" %>
6 <%= text_input f, :name %>
7 <br>
8 <br>
9 <%= label f, :password, "Password" %>
10 <%= password_input f, :password %>
11 <br>
12 <br>
13
14 <%= label f, :scope, "Permissions" %>
15 <br>
16 <%= for scope <- @scopes do %>
17 <%= checkbox f, :"scopes_#{scope}", value: scope, checked_value: scope, unchecked_value: "", name: "authorization[scopes][]" %>
18 <%= label f, :"scopes_#{scope}", String.capitalize(scope) %>
19 <br>
20 <% end %>
21
22 <%= hidden_input f, :client_id, value: @client_id %>
23 <%= hidden_input f, :response_type, value: @response_type %>
24 <%= hidden_input f, :redirect_uri, value: @redirect_uri %>
25 <%= hidden_input f, :state, value: @state%>
26 <%= submit "Authorize" %>
27 <% end %>