NAME

WWW::Suffit::Plugin::API::User - The User API Suffit plugin

SYNOPSIS

use Mojo::Base 'WWW::Suffit::Server';

sub startup {
    my $self = shift->SUPER::startup();
    $self->plugin('API::User', {
        prefix_path => "/user",
        prefix_name => "user",
    });

    # . . .
}

sub startup {
    my $self = shift->SUPER::startup(
        init_user_routes => 'on',
        user_routes_opts => {
            prefix_path => "/user",
            prefix_name => "user",
        }
    );

    # . . .
}

DESCRIPTION

The User API Suffit plugin

This plugin requires WWW::Suffit::Plugin::API plugin

OPTIONS

This plugin supports the following options

prefix_name

prefix_name => "user"

This option defines prefix of user api route name

Default: 'user'

prefix_path

prefix_path => "/user"

This option defines prefix of user api route

Default: '/user'

METHODS

This plugin inherits all methods from Mojolicious::Plugin and implements the following new ones

register

This method register the plugin and helpers in Mojolicious application

$plugin->register(Mojolicious->new, {
    prefix_path => "/user",
    prefix_name => "user",
});

Register plugin in Mojolicious application

SEE ALSO

Mojolicious, WWW::Suffit::Server, WWW::Suffit::AuthDB, WWW::Suffit::Plugin::API

AUTHOR

Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>

COPYRIGHT

Copyright (C) 1998-2024 D&D Corporation. All Rights Reserved

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See LICENSE file and https://dev.perl.org/licenses/