in reply to Re: PerlMonks MUD in progress
in thread PerlMonks MUD in progress
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: PerlMonks MUD in progress
by Anonymous Monk on Jul 14, 2003 at 07:41 UTC | |
by Coruscate (Sexton) on Jul 14, 2003 at 17:38 UTC |