Remitt:: Utilities

Contains general purpose utility functions necessary for the low-level operation of Remitt.

Summary
Contains general purpose utility functions necessary for the low-level operation of Remitt.
Perform authentication for XML-RPC server basic authentication.
Get the global configuration object of type <Config::IniFiles>.
Produce “authentication failed” XML-RPC fault.
Force authentication check using basic authentication.
The “Translation” layer of plugins for Remitt is a hidden layer, which means that the user only has to specify a “Render” layer and “Transport” layer plugin.
Store output from a transport plugin, and return the data.
Store actual file in the REMITT spool for a particular user.

Functions

Remitt:: Utilities:: Authenticate

sub Authenticate

Perform authentication for XML-RPC server basic authentication.

Returns

Array containing ( boolean authenticated, string username )

Remitt:: Utilities:: Configuration

sub Configuration

Get the global configuration object of type <Config::IniFiles>.  Currently this is not cached.

Returns

Configuration object.

Remitt:: Utilities:: Fault

sub Fault

Produce “authentication failed” XML-RPC fault.

Remitt:: Utilities:: ForceAuthentication

sub ForceAuthentication

Force authentication check using basic authentication.  Uses basic authentication username and password to check against session data, and returns an XML-RPC fault if authentication fails.

Remitt:: Utilities:: ResolveTranslationPlugin

The “Translation” layer of plugins for Remitt is a hidden layer, which means that the user only has to specify a “Render” layer and “Transport” layer plugin.  This function resolves the plugin that is to be used for the “Translation” layer.

Parameters

$renderRendering plugin
$renderoptionRendering plugin option.  If this is declared as ‘’, no render option is needed.
$transportTransport plugin

Returns

Name of the Translation plugin to be used.

Remitt:: Utilities:: StoreContents

Store output from a transport plugin, and return the data.  This is mostly necessary because the command-line interface does not want the data stored on the server, but rather returned immediately.

Parameters

$inputInput data from the output of the transport layer plugin.
$transportName of the transport plugin that is being used.
$extensionFilename extension to use.

Return

Data to return to calling subroutine.

Remitt:: Utilities:: StoreFile

Store actual file in the REMITT spool for a particular user.  This is more or less an internal function, and is called by Remitt::Utilities::StoreContents.

Parameters

$userUser name of user logged into REMITT server.
$nameFile name.
$categoryType of file.
$contentsString containing file contents.

Returns

True if successful.

SeeAlso

Remitt::Utilities::StoreContents

sub Authenticate
Perform authentication for XML-RPC server basic authentication.
sub Configuration
Get the global configuration object of type Config::IniFiles.
sub Fault
Produce “authentication failed” XML-RPC fault.
sub ForceAuthentication
Force authentication check using basic authentication.
Store output from a transport plugin, and return the data.