NAME

MToken::Server - mod_perl2 server for storing backups of MToken devices

VERSION

Version 1.01

SYNOPSIS

    # Apache2 config section
    <Location /mtoken>
       SetHandler modperl
       PerlResponseHandler MToken::Server
       #PerlSetVar Debug 1
       PerlSetVar MTokenDir /var/www/mtoken
    </Location>

DESCRIPTION

To use the functionality of this module, you must edit the virtual-host section of the Apache2 WEB server configuration file by specifying the directory for storing backup files and authorization data. For example please run command: "make serverconfig"

FUNCTIONS

handler

Handler for Apache2 WEB server

index_get

This function returns a list of files on directory in the JSON format

    {
       "response_object" : "index_get",
       "data" : {
          "uri" : "/mtoken",
          "finished" : 1501500207,
          "is_index" : 1,
          "qs" : "",
          "started" : 1501500206,
          "method" : "GET",
          "finishedfmt" : "07/31/17 14:23:27 MSK",
          "location" : "/mtoken",
          "startedfmt" : "07/31/17 14:23:26 MSK",
          "debug" : 0,
          "filename" : "",
          "mtokendir" : "/var/www/mtoken/mtoken",
          "files" : [
             {
                "sha1" : "9a7cf5e50477dceab768fdc449eee233e3a9d670",
                "date_fmt" : "2017/07/26",
                "file" : "/var/www/mtoken/mtoken/myfooproject.20170726",
                "size" : 19830,
                "filename" : "myfooproject.20170726",
                "md5" : "4b435617553a7a226210b142ccb2cbcc",
                "date_sfx" : "20170726"
             }
          ]
       },
       "request_object" : null,
       "error" : [],
       "status" : 1
    }
index_post

This function add new backup file to directory

file_get

This function provides downloading the backup file from directory

file_put

Update the backup file in the directory

file_delete

This function provides removing the backup file from directory

HISTORY

See Changes file

DEPENDENCIES

LWP, mod_perl2, CTK

TO DO

See TODO file

BUGS

* none noted

SEE ALSO

CTK, mod_perl2

AUTHOR

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

COPYRIGHT

Copyright (C) 1998-2019 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/