4. Esempi
L'utente "joe" potrebbe desiderare di accedere come utente "pete" sulla macchina "foo". Se "pete" ha configurato "foo" per consentire a "joe" l'accesso al proprio account, allora il client invierebbe IAC SB AUTHENTICATION NAME "pete" IAC SE IAC SB AUTHENTICATION IS SPX AUTH <joe's spx authentication token> IAC SE. Il server autenticherebbe quindi l'utente come "joe" dalle informazioni del token e il server invierebbe indietro ACCEPT o REJECT. Se viene utilizzata l'autenticazione mutua, il server includerebbe nel messaggio ACCEPT una risposta mutua. Il controllo di autorizzazione per verificare se "pete" sta consentendo a "joe" di utilizzare il proprio account viene effettuato dopo che lo scambio di autenticazione è completo. Pertanto, è possibile che il client riceva una risposta ACCEPT (basata sul token di autenticazione), ma che a joe venga negato l'accesso per accedere all'account di pete.
Client Server
IAC DO AUTHENTICATION
IAC WILL AUTHENTICATION
[ The server is now free to request authentication information.
]
IAC SB AUTHENTICATION SEND SPX
CLIENT|MUTUAL SPX CLIENT|ONE_WAY
IAC SE
[ The server has requested mutual SPX authentication. If mutual
authentication is not supported, then the server is willing to
do one-way SPX authentication. ]
[ The client will now respond with the name of the user that it
wants to log in as, and the SPX authentication token. ]
IAC SB AUTHENTICATION NAME
"pete" IAC SE
IAC SB AUTHENTICATION IS SPX
CLIENT|MUTUAL AUTH <spx
authentication token
information> IAC SE
[ The server responds with an ACCEPT command to state that the
authentication was successful. ]
[ If AUTH_HOW_MUTUAL, the server responds with the mutual
response so the client can verify that it is really talking to
the right server. ]
[ If AUTH_HOW_ONE_WAY, the server responds with a NULL mutual
response, since the client is willing to trust the server
already. ]
IAC SB AUTHENTICATION REPLY SPX
CLIENT|MUTUAL ACCEPT <mutual
response> IAC SE