Ejemplo n.º 1
0
                   get('/reset-password/<token>', SecurityController.
                       reset_password),
               ]),
    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.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'),
Ejemplo n.º 2
0
from .views import SiteController
from flask_unchained.bundles.oauth.views import OAuthController
from flask_unchained.bundles.security import SecurityController, UserResource

routes = lambda: [
    controller(SiteController),
    controller('/auth',
               SecurityController,
               rules=[
                   get('/confirm/<token>', SecurityController.confirm_email),
                   get('/reset-password/<token>', SecurityController.
                       reset_password),
               ]),
    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,
Ejemplo n.º 3
0
                       reset_password),
               ]),
    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),
        prefix('/blog', [
            resource('/articles', ArticleResource),
            resource('/categories', CategoryResource),
            resource('/series', SeriesResource),
            resource('/tags', TagResource),
        ]),
        resource('/contact-submissions', ContactSubmissionResource),
    ]),

    # frontend routes