}
authenticate ASCII {
- #
- # If we don't have all the required data, request it.
- #
- if (!&User-Name) {
- &reply.Packet-Type := Authentication-GetUser
- handled
- }
- if (!&User-Password) {
- &reply.Packet-Type := Authentication-GetPass
- handled
- }
-
- #
- # Now we have the data perform authentication
- #
if (&User-Name == 'tapioca' && &User-Password == 'queijo') {
&reply.Server-Message := "ASCII authentication accepted"
ok
}
recv Authentication-Continue {
- &control.Auth-Type := ASCII
-
- #
- # Fill the next missing attribute from User-Message
- #
- if (!&User-Name) {
- &User-Name := &User-Message
- handled
- }
- if (!&User-Password) {
- &User-Password := &User-Message
- handled
- }
+ ok
}
recv Authorization-Request {