Add very basic oauth and mastodon api support.
This commit is contained in:
parent
4e785df984
commit
2a298d70f9
16 changed files with 286 additions and 0 deletions
2
lib/pleroma/web/templates/o_auth/o_auth/results.html.eex
Normal file
2
lib/pleroma/web/templates/o_auth/o_auth/results.html.eex
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Successfully authorized</h1>
|
||||
<h2>Token code is <%= @auth.token %></h2>
|
||||
14
lib/pleroma/web/templates/o_auth/o_auth/show.html.eex
Normal file
14
lib/pleroma/web/templates/o_auth/o_auth/show.html.eex
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<h2>OAuth Authorization</h2>
|
||||
<%= form_for @conn, o_auth_path(@conn, :authorize), [as: "authorization"], fn f -> %>
|
||||
<%= label f, :name, "Name" %>
|
||||
<%= text_input f, :name %>
|
||||
<br>
|
||||
<%= label f, :password, "Password" %>
|
||||
<%= password_input f, :password %>
|
||||
<br>
|
||||
<%= hidden_input f, :client_id, value: @client_id %>
|
||||
<%= hidden_input f, :response_type, value: @response_type %>
|
||||
<%= hidden_input f, :redirect_uri, value: @redirect_uri %>
|
||||
<%= hidden_input f, :scope, value: @scope %>
|
||||
<%= submit "Authorize" %>
|
||||
<% end %>
|
||||
Loading…
Add table
Add a link
Reference in a new issue