diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-02-09 17:09:08 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-02-09 17:09:08 +0300 |
commit | 4ad843fb9df838f36c014ddfb76d7107ba2b5c7b (patch) | |
tree | 661ff9cb6e6cdadfdf8e980841f8d11b315df56a /lib/pleroma/web/oauth.ex | |
parent | 99fd199bda8bd90cd3e8c69d54087531ddc02eac (diff) | |
download | pleroma-4ad843fb9df838f36c014ddfb76d7107ba2b5c7b.tar.gz |
[#468] Prototype of OAuth2 scopes support. TwitterAPI scope restrictions.
Diffstat (limited to 'lib/pleroma/web/oauth.ex')
-rw-r--r-- | lib/pleroma/web/oauth.ex | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/pleroma/web/oauth.ex b/lib/pleroma/web/oauth.ex new file mode 100644 index 000000000..44b83433e --- /dev/null +++ b/lib/pleroma/web/oauth.ex @@ -0,0 +1,11 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + +defmodule Pleroma.Web.OAuth do + def parse_scopes(scopes) do + scopes + |> to_string() + |> String.split([" ", ","]) + end +end |