
Oak::AAS::Session - Authentication and Authorization Service Session


This class implements the Client side for the Oak Authentication and Authorization Service.

The service to be consulted. composed by:
"aas_service;params"
Where:
aas_service => One of the AAS services See L<Oak::AAS::Service|Oak::AAS::Service> for
information about services.
params => Parameters to the aas service
The AAS Service is instanciated only once, after that a cache copy will be used.
The user login
The unique id of this session

Create a Session using the passed service and user.
Check user and password and start a new session. The session id will be defined in the session_id property. Throws an Oak::AAS::AuthenticationError if the password is invalid
Check if this is a valid session. Throws an Oak::AAS::AuthenticationError if not.
End this session, the session_id will be no longer valid.
Test if the current user is allowed to access the specified service. If so, the block will be executed. Else an Oak::AAS::AuthorizationError will be thrown.
The syntax is:
restricted $session "/service", sub {
# do something;
print "Hello World!";
}; # DO NOT FORGET THE ;

Copyright (c) 2003 Oktiva <http://www.oktiva.com.br> All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.