🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #55770

Re: Best way to determine if login is required?

#55770
From: Curt Welch
Date: Fri, 28 Dec 2001 04:22
40 lines
3342 bytes
"Bill Kearney" <wkearney99@hotmail.com> wrote:
> Hi all,
>
> What's considered the 'best practice' for determining if a client needs
> to log into a server?  I'm assuming the server is going to be supporting
> the AUTHINFO commands.  How should one 'feel out' the server to see if it
> wants authentication?  I'm trying to write a client that will handle both
> authenticated and anonymous access.  But if the user 'improperly' inserts
> a username/password pair I'm considering whether the client should ignore
> those values and proceed anonymously.  That is, anonymously in the
> context of not performing the authinfo command.

No you shouldn't do that.  You need to force the user to decide whether
to send the password or not, and if the user tells you to send the
password, do that right after sending MODE READER (which should always send
at the start even though most "real" servers ignore it. :)).  You will also
need to watch for the 480 responses and be ready to send it again however.

To help the user understand the issues, do something like what OE has done.
Add an extra checkbox that says something like "server requires user name
and password".  And if they don't check that, don't let them enter the
user name and password (i.e. disable or hide the user name and password
fields).  This gives the user something obvious to try when the login isn't
working, i.e. they try turning that check off to see if it works.

Also, when they have a user name and password which isn't working, it would
be good to include some words of advice in the error message - i.e. tell
them to try turning the checkbox off (or even better, give them a button
they can click in the error dialog which will try the connection again
without sending the user name and password).

There is no standard type of behavior you can see in news server to know if
it's needed or not.  Even a server which is working may work "better" (e.g.
give the user a higher speed connection) after authenticating, so you
should always authenticate if the user has told you to do that.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20011227232251.205$Zg@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed1.cidera.com!Cidera!feed2.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <WbIW7.880$5c4.125016@newsread1.prod.itd.earthlink.net>

Show Full Headers
Complete Article Headers
Message-ID: <20011227232251.205$Zg@newsreader.com>
Subject: Re: Best way to determine if login is required?
Date: Fri, 28 Dec 2001 04:22:51 +0000
From: curt@kcwc.com (Curt Welch)
References: <WbIW7.880$5c4.125016@newsread1.prod.itd.earthlink.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed1.cidera.com!Cidera!feed2.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com wjK5cOQfZ.9gqP-0n5@YWEY0FEBL.WsTjEuxEKkkYxLBwl
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
  %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 39