5dc71456cb48af2ee13471bda0113e4b4db4ffc9
[mediagoblin.git] / mediagoblin / federation / routing.py
1 # GNU MediaGoblin -- federated, autonomous media hosting
2 # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU Affero General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details.
13 #
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17 from mediagoblin.tools.routing import add_route
18
19 # client registration & oauth
20 add_route(
21 "mediagoblin.federation",
22 "/api/client/register",
23 "mediagoblin.federation.views:client_register"
24 )
25
26
27 add_route(
28 "mediagoblin.federation",
29 "/oauth/request_token",
30 "mediagoblin.federation.views:request_token"
31 )
32
33 add_route(
34 "mediagoblin.federation",
35 "/oauth/authorize",
36 "mediagoblin.federation.views:authorize",
37 )
38
39 add_route(
40 "mediagoblin.federation",
41 "/oauth/access_token",
42 "mediagoblin.federation.views:access_token"
43 )
44
45 add_route(
46 "mediagoblin.federation",
47 "/api/test",
48 "mediagoblin.federation.views:test"
49 )