X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Foauth%2Foauth_controller.ex;h=5c2b0507c9a0c8c5dc48fb0dff643986c22d55b8;hb=cf426a719dfe26a11b0bf0a22a08fd45ca5b9dc2;hp=abe6fd2f239cbd71a93e10f5f1079c7022f96cfc;hpb=1097ce6d9f06a7552652c5990cee12e7b7b3cc59;p=akkoma diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex index abe6fd2f2..5c2b0507c 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -5,7 +5,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do use Pleroma.Web, :controller - alias Pleroma.Web.OAuth + alias Pleroma.Web.Auth.DatabaseAuthenticator alias Pleroma.Web.OAuth.Authorization alias Pleroma.Web.OAuth.Token alias Pleroma.Web.OAuth.App @@ -25,7 +25,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do available_scopes = (app && app.scopes) || [] scopes = oauth_scopes(params, nil) || available_scopes - template = Application.get_env(:pleroma, :auth_template, "show.html") + template = Pleroma.Config.get(:auth_template, "show.html") render(conn, template, %{ response_type: params["response_type"], @@ -45,7 +45,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do "redirect_uri" => redirect_uri } = auth_params }) do - with {_, {:ok, %User{} = user}} <- {:get_user, OAuth.authenticator().get_user(conn)}, + with {_, {:ok, %User{} = user}} <- {:get_user, DatabaseAuthenticator.get_user(conn)}, %App{} = app <- Repo.get_by(App, client_id: client_id), true <- redirect_uri in String.split(app.redirect_uris), scopes <- oauth_scopes(auth_params, []), @@ -98,7 +98,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do |> authorize(auth_params) error -> - OAuth.authenticator().handle_error(conn, error) + DatabaseAuthenticator.handle_error(conn, error) end end