Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

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

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


NAME

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


HIERARCHY

Oak::Object

Oak::AAS::Session


DESCRIPTION

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


PROPERTIES

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.

user
The user login

session_id
The unique id of this session


METHODS

constructor(service => $sevice, user => $user)
Create a Session using the passed service and user.

start(user => $login, password => $passwd);
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

validate(user => $login, session_id => $sid);
Check if this is a valid session. Throws an Oak::AAS::AuthenticationError if not.

end()
End this session, the session_id will be no longer valid.

restricted $sessionobj ``/path/to/a/service'', sub { ``do_something'' }
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

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.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy