in reply to Re^4: Integrating Perl cgi forms with Drupal site, any advise on unified login issue?
in thread Integrating Perl cgi forms with Drupal site, any advise on unified login issue?
my $exitcod_zero_means_something = system '/usr/local/bin/drupal_fun_authenticator', '--cookie=cookie', ... ;;;;; ### or sub is_authorized { my ( $authcookie, ... ) = @_; my $wget = join ' ', map { "'$_'" } "--header=cookie:$authcookie", 'https://localhost:3000/hey_drupal_authenticate_by_cookie', ... ;;;;; my $json_auth_str = qx{wget $wget } my $auth = decode_json( $json_auth_str ); return 1 if $auth->{is_authorized}; return 0; }
drupal, being so popular and what not, surely has such an interface -- I'd go looking for it -- official API is safer than peeking into the database
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Integrating Perl cgi forms with Drupal site, any advise on unified login issue?
by dimuse_dioplut (Initiate) on May 28, 2013 at 22:57 UTC |