GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  OPENXPKI::SERVER::SESSION::MOCK (3)

.ds Aq ’

Name

OpenXPKI::Server::Session::Mock

CONTENTS

Description

This class mimics the behaviour of the default session class but actually does nothing stateful. In particular it does not save the session information.

However, during the lifetime of the object instance it is possible to stow information into the session object and to retrieve them again using the accessor methods.

This is useful e. g. for Service implementations that do not need sessions themselves but that rely on API functions which access the server context in order to extract session information such like the current PKI realm.

Typical usage:



  use OpenXPKI::Server::Context qw( CTX );
  use OpenXPKI::Server::Session::Mock;

  my $session = OpenXPKI::Server::Session::Mock->new();
  OpenXPKI::Server::Context::setcontext({session => $session});

  CTX(session)->set_pki_realm(foobar);



You can now use API functions that require e. g. the PKI realm information to be present in the Context.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 OPENXPKI::SERVER::SESSION::MOCK (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.