メインコンテンツまでスキップ

4. 例

ユーザ "joe" は、マシン "foo" 上のユーザ "pete" としてログインしたい場合がある。"pete" が "foo" 上で "joe" に自分のアカウントへのアクセスを許可するように設定していれば、クライアントは IAC SB AUTHENTICATION NAME "pete" IAC SE IAC SB AUTHENTICATION IS SPX AUTH <joe's spx authentication token> IAC SE を送信する。サーバは、トークン情報からユーザを "joe" として認証し、ACCEPT または REJECT のいずれかを送信して返す。相互認証が使用されている場合、サーバは ACCEPT メッセージに mutual response を含める。pete が joe に自分のアカウントの使用を許可しているかどうかを確認する認可チェックは、認証のやり取りが完了した後に行われる。したがって、クライアントは (認証トークンに基づく) ACCEPT 応答を受信することは可能であるが、joe が 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