예제 #1
0
            SecurityController,
            rules=[
                get('/check-auth-token',
                    SecurityController.check_auth_token,
                    only_if=True),
                post('/login', SecurityController.login),
                get('/logout', SecurityController.logout),
                post('/send-confirmation-email', SecurityController.
                     send_confirmation_email),
                post('/forgot-password', SecurityController.forgot_password),
                post('/reset-password/<token>',
                     SecurityController.reset_password,
                     endpoint='security.post_reset_password'),
                post('/change-password', SecurityController.change_password),
            ]),
        resource('/users', UserResource),
        resource('/contact-submissions', ContactSubmissionResource),
        prefix('/finance', [
            controller('/', HistoryController),
            resource('/watchlists', WatchlistResource),
        ]),
    ]),

    # frontend routes
    get('/', endpoint='frontend.index'),
    get('/login/forgot-password', endpoint='frontend.forgot_password'),
    get('/login/reset-password/<token>', endpoint='frontend.reset_password'),
    get('/sign-up/resend-confirmation-email',
        endpoint='frontend.resend_confirmation_email'),
]
예제 #2
0
               ]),
    include('flask_unchained.bundles.admin.routes'),
    prefix('/auth', [controller(OAuthController)]),
    prefix('/api/v1', [
        controller(
            '/auth',
            SecurityController,
            rules=[
                get('/check-auth-token',
                    SecurityController.check_auth_token,
                    only_if=True),
                post('/login', SecurityController.login),
                get('/logout', SecurityController.logout),
                post('/send-confirmation-email', SecurityController.
                     send_confirmation_email),
                post('/forgot-password', SecurityController.forgot_password),
                post('/reset-password/<token>',
                     SecurityController.reset_password,
                     endpoint='security_controller.post_reset_password'),
                post('/change-password', SecurityController.change_password),
            ]),
        resource('/users', UserResource),
    ]),
    # frontend routes
    get('/', endpoint='frontend.index'),
    get('/login/forgot-password', endpoint='frontend.forgot_password'),
    get('/login/reset-password/<token>', endpoint='frontend.reset_password'),
    get('/sign-up/resend-confirmation-email',
        endpoint='frontend.resend_confirmation_email'),
]
            SecurityController,
            rules=[
                get('/check-auth-token',
                    SecurityController.check_auth_token,
                    only_if=True),
                post('/login', SecurityController.login),
                get('/logout', SecurityController.logout),
                post('/send-confirmation-email', SecurityController.
                     send_confirmation_email),
                post('/forgot-password', SecurityController.forgot_password),
                post('/reset-password/<token>',
                     SecurityController.reset_password,
                     endpoint='security_controller.post_reset_password'),
                post('/change-password', SecurityController.change_password),
            ]),
        resource('/users', UserResource),
        prefix('/blog', [
            resource('/articles', ArticleResource),
            resource('/categories', CategoryResource),
            resource('/series', SeriesResource),
            resource('/tags', TagResource),
        ]),
        resource('/contact-submissions', ContactSubmissionResource),
    ]),

    # frontend routes
    get('/', endpoint='frontend.index'),
    get('/login/forgot-password', endpoint='frontend.forgot_password'),
    get('/login/reset-password/<token>', endpoint='frontend.reset_password'),
    get('/sign-up/resend-confirmation-email',
        endpoint='frontend.resend_confirmation_email'),