Aut::UI::Console - Reference implementation for a User Interface to L


Aut documentation  | view source Contained in the Aut distribution.

Index


NAME

Top

Aut::UI::Console - Reference implementation for a User Interface to Aut

ABSTRACT

Top

This is a very simple Console based reference implementation for a User Interface to the Aut Framework.

DESCRIPTION

Top

Aut::UI:... classes are user interface classes to Aut. They are called through the Aut module. Most methods that have to be implemented, when called through an Aut object are given this same object as an argument, to make it possible to call back into the Aut object.

Note!

Instantiating and initializing

new() --> Aut::UI::Console

This method instantiates a new Aut::UI::Console object.

initialize(level::\(list authorization_level:string, admin_level:string) --> void

This method is called from an Aut object to initialize the user interface with a list of possible authorization levels and the level that has administrator rights.

message_ok(msg:string) --> void

This function displays message 'msg' and waits for input (OK button, Enter, whatever is standard for the given UI environment).

ask_pass(aut:Aut, msg:string [,any]) --> string

This function displays message 'msg', displays a appropriate prompt and asks the user to input his/hers password.

Returns the password that has been entered, or undef, if an empty password has been given.

login(aut:Aut [,any]) --> Aut::Ticket

This function askes account and password and returns a ticket for the given account. The ticket can be retreived from the Aut object, using the aut->ticket_get function.

logout(aut:Aut, ticket:Aut::Ticket, [,any]) --> boolean

This function can be used to inform the user about logging out and check certain properties before logging out (e.g. if the user confirms logging out). It returns true, if the user can logout, false otherwise.

change_pass(aut:Aut, ticket:Aut::Ticket, [,any] --> void

This function is used to enable changing a password for a given ticket. The function must ask the password two times, validate their equalness, validate the password through aut->check_pass() and if valid, store the new password in the ticket using ticket->set_pass(pass) and update the ticket in the backend using aut->ticket_update(ticket).

Administration

admin(aut:Aut, ticket, [,any]) --> void

This function is used to do account administration. It takes the aut system as argument and the ticket of the administrator that is going to do administration. It must provide following functionality:

1

Adding new accounts.

2

Changing the password for an account.

3

Changing the rights for an account.

4

Delete an account.

See the implementation of Aut::UI::Console for a reference on how this is done using the given aut object.

SEE ALSO

Top

<Aut Framework|Aut>.

AUTHOR

Top

Hans Oesterholt-Dijkema <oesterhol@cpan.org>

COPYRIGHT AND LICENSE

Top


Aut documentation  | view source Contained in the Aut distribution.