예제 #1
0
admin.autodiscover()

urlpatterns = patterns(
    '',

    # Core endpoints
    url(r'', include("core.urls", namespace="core")),

    # Authentication endpoints
    url(r'', include("iplantauth.urls", namespace="iplantauth")),

    # API Layer endpoints
    url(r'^api/', include("api.urls", namespace="api")),

    # v2 API auth by token
    url(r'^auth$', Authentication.as_view(), name='token-auth'),

    # DRF API Login/Logout
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),

    # Token login (Used internally by DRF?)
    url(r'^api-token-auth/',
        'rest_framework.authtoken.views.obtain_auth_token'),

    # DB Admin Panel for admin users
    url(r'^admin/', include(admin.site.urls)))


if settings.DEBUG and 'debug_toolbar.middleware.DebugToolbarMiddleware' in settings.MIDDLEWARE_CLASSES:
    try:
예제 #2
0
    '',

    # "The Front Door"
    url(r'^$', 'web.views.redirectApp'),

    # ADMIN Section:
    # Emulation controls for admin users
    url(r'^api/emulate$', 'web.views.emulate_request'),
    url(r'^api/emulate/(?P<username>(%s))$' % user_match,
        'web.views.emulate_request'),
    # DB Admin Panel for admin users
    url(r'^admin/', include(admin.site.urls)),
    url(r'^admin_login/', 'web.views.redirectAdmin'),

    #v2 api auth by token
    url(r'^auth$', Authentication.as_view(), name='token-auth'),
    #url(r'^auth$', 'authentication.views.token_auth', name='token-auth'),

    #File Retrieval:
    # Systemwide
    #TODO: Remove when using Troposphere
    url(r'^resources/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': resources_path}),

    # GLOBAL Authentication Section:
    #   Login/Logout
    url(r'^oauth2.0/callbackAuthorize$', 'web.views.o_callback_authorize'),
    url(r'^o_login$', 'web.views.o_login_redirect'),
    url(r'^s_login$', 'web.views.s_login'),
    url(r'^s_serviceValidater$',
        'authentication.protocol.cas.saml_validateTicket',