Remote Login
#1
Posted 08 May 2012 - 08:17 AM
I would have expected there to be an XML-RPC method or something like that, but I can't find anything in the documentation. Does no such method exist or is it just not documented?
(I already posted this in technical support forums, but this forum may be more appropriate)
#2
Posted 09 May 2012 - 02:49 AM
Something like:
<?php
/* Variables */
$email = $_GET['email'];
$md5Pass = $_GET['md5pass'];
/* Init IPB */
define( 'IPS_ENFORCE_ACCESS', TRUE );
define( 'IPB_THIS_SCRIPT', 'public' );
require_once( './initdata.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );/*noLibHook*/
$registry = ipsRegistry::instance();
$registry->init();
/* Get Member */
$member = IPSMember::load( $email, 'none', 'email' );
if ( !$member['member_id'] )
{
echo json_encode( array( 'success' => FALSE, 'message' => 'NO_MEMBER' ) );
exit;
}
/* Authenticate */
if ( IPSMember::authenticateMember( $member['member_id'], $md5Pass ) )
{
echo json_encode( array( 'success' => TRUE, 'message' => '' ) );
}
else
{
echo json_encode( array( 'success' => FALSE, 'message' => 'BAD_PASS' ) );
}
- Marcher Technologies likes this
#3
Posted 09 May 2012 - 06:11 PM
One question though - does IP.Board hash the raw password or the version with entities? E.g. if my password is "<>", what exactly does IP.Board use as the md5 hash? Is it md5('<>') or md5('<>')?
This would make things quite a bit more complicated, since I'd have to do some otherwise unnecessary postprocessing of the string before hashing it...
#4
Posted 09 May 2012 - 07:39 PM
http://community.inv...in-ipboard-r501
This article describes the characters in the password that are converted, in the event you need to do the same on your end for comparison
http://community.inv...ogin-modules-r7
Developer / Senior Support
If it sounds like fun, it's not allowed on the bus!

Invision Power Services, Inc.
#5
Posted 22 March 2013 - 09:49 AM
bfarber, that link doesnt work anymore. Can someone provide a updated link on that?
#6
Posted 22 March 2013 - 10:32 AM
Ryan Ashbrook - @ryanashbrook
Invision Power Services, Inc.
Saving the world. One IP.Board at a time.
#7
Posted 22 March 2013 - 10:41 AM
Sure,
https://www.invision...in-ipboard-r130
and
http://www.invisionp...gin-modules-r42
Also, you may wish to either utilize IPB's built-in brute force prevention (see admin/sources/loginauth/login_core.php, starting around line 287 -- you might be able to make use of it without duplicating code by instantiating the internal login class and calling authenticate() on that) or restrict access to your script so that only the IP of your other application can access it. This way people cannot brute force your user's passwords, which is probably a Good Thing™.
EDIT: Ninja'd by Ryan Ashbrook, but I'll keep this here anyway since it includes some information I feel is important and not covered above.
Edited by skizzerz, 22 March 2013 - 10:43 AM.
- Ryan Ashbrook likes this
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













