urls.py 543 Bytes
Newer Older
1 2 3 4
""" URL configuration for the third party auth API """

from django.conf.urls import patterns, url

Pan Luo committed
5
from .views import UserView, UserMappingView
6 7

USERNAME_PATTERN = r'(?P<username>[\w.+-]+)'
Pan Luo committed
8
PROVIDER_PATTERN = r'(?P<provider_id>[\w.+-]+)(?:\:(?P<idp_slug>[\w.+-]+))?'
9 10 11 12

urlpatterns = patterns(
    '',
    url(r'^v0/users/' + USERNAME_PATTERN + '$', UserView.as_view(), name='third_party_auth_users_api'),
Pan Luo committed
13 14
    url(r'^v0/providers/' + PROVIDER_PATTERN + '/users$', UserMappingView.as_view(),
        name='third_party_auth_user_mapping_api'),
15
)