from django.conf.urls import url

from .. import settings as app_settings
from . import views

urlpatterns = [
    url(r'^authorize/$', views.authorize, name='authorize'),
    url(r'^postauth/$', views.postauth, name='postauth'),
    url(r'^accounting/$', views.accounting, name='accounting'),
    url(r'^batch/$', views.batch, name='batch'),
]

if app_settings.REST_USER_TOKEN_ENABLED:
    urlpatterns += [
        url(r'^account/token/$',
            views.obtain_auth_token,
            name='user_auth_token'),
        url(r'^account/token/validate/$',
            views.validate_auth_token,
            name='validate_auth_token')
    ]
