| Aut documentation | view source | Contained in the Aut distribution. |
login(aut:Aut [,any]) --> Aut::Ticketlogout(aut:Aut, ticket:Aut::Ticket, [,any]) --> booleanchange_pass(aut:Aut, ticket:Aut::Ticket, [,any] --> voidAut::UI::Console - Reference implementation for a User Interface to Aut
This is a very simple Console based reference implementation for a User Interface to the Aut Framework.
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.
new() --> Aut::UI::ConsoleThis method instantiates a new Aut::UI::Console object.
initialize(level::\(list authorization_level:string, admin_level:string) --> voidmessage_ok(msg:string) --> voidThis 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]) --> stringThis 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::TicketThis 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]) --> booleanThis 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] --> voidThis 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).
admin(aut:Aut, ticket, [,any]) --> voidThis 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:
Adding new accounts.
Changing the password for an account.
Changing the rights for an account.
Delete an account.
See the implementation of Aut::UI::Console for a reference on how this is
done using the given aut object.
<Aut Framework|Aut>.
Hans Oesterholt-Dijkema <oesterhol@cpan.org>
This library is free software; you can redistribute it and/or modify it under Artistic license
| Aut documentation | view source | Contained in the Aut distribution. |