My signature is the way it is because I like to note the fact that downvotes are a welcome factor when they are given when appropriate. It's also a memo to those who downvote without reason: if you can't give me a reason for the downvote, then I take the negative vote as just that: a physical vote with no thought on the voter's side of things. If however, I am told why I was knocked down, I know the voter spent time analyzing my post. I can take it as constructive critisism and can fix things so that the post will provide a better response for the next reader that stumbles upon it.

Perhaps just getting users to /msg you and then sending them a new generated password.

Yes, that's fine if all I needed to do was verify that a new player is an existing PerlMonks member. This method would not allow me to later access the site with their login (programatically of course). For example, if and when I add a feature that allows users to check their private messages, I would require the login cookie which effectively requires a username/password combo to first be sent to the site.

Besides, how were you going to authenticate their user/pass in the first place - login to perlmonks as them?

Essentially... yes. To be precise, I'll be executing more or less the following code for now. In the future, the value of $xml->{'_headers'}->{'set-cookie'} may need to be kept (only in memory) for the duration of a session in order to allow successive hits to the site's xml feeds as a logged in user. Note that the cookie wouldn't even be stored in a database. Only in memory from the point in time when a user logs into the MUD to the time they logout.

my $username = user_input('Username: '); my $password = user_input('Password: '); my $ua = new LWP::UserAgent; my $xml = $ua->get( 'http://www.perlmonks.org/index.pl?node_id=227820&' . 'op=login&user=' . uri_escape($username) . '&passwd=' . uri_escape($password) ); undef $password; # deny access to $password later on deny_access('User authentication failed.') unless grep { /set\-cookie/i } keys %{$xml->{_headers}};

Thanks :)


If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, please reply to this node or /msg me to inform me as to what is wrong with the post, so that I may update the node to the best of my ability.


In reply to Re^2: PerlMonks MUD in progress by Coruscate
in thread PerlMonks MUD in progress by Coruscate

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.