[#923] OAuth consumer mode refactoring, new tests, tests adjustments, readme.

This commit is contained in:
Ivan Tashkinov 2019-04-05 15:12:02 +03:00
commit 47a236f753
10 changed files with 258 additions and 135 deletions

View file

@ -9,7 +9,7 @@
<%= hidden_input f, :redirect_uri, value: @redirect_uri %>
<%= hidden_input f, :state, value: @state %>
<%= for strategy <- Pleroma.Config.get([:auth, :oauth_consumer_strategies], []) do %>
<%= for strategy <- Pleroma.Config.oauth_consumer_strategies() do %>
<%= submit "Sign in with #{String.capitalize(strategy)}", name: "provider", value: strategy %>
<% end %>
<% end %>

View file

@ -26,6 +26,6 @@
<%= submit "Authorize" %>
<% end %>
<%= if Pleroma.Config.get([:auth, :oauth_consumer_enabled]) do %>
<%= if Pleroma.Config.oauth_consumer_enabled?() do %>
<%= render @view_module, Pleroma.Web.Auth.Authenticator.oauth_consumer_template(), assigns %>
<% end %>