Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2013, 08:43 AM
acalero acalero is offline
 
Join Date: Jun 2013
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default External login access

Hi.

I'm trying to login to our vBulletin forum from one external website (at same host).

The process I'm following is accessing the Api with the login_login method, so I recive one proper session.dbsessionhash and the session.userid with a redirect_login response.

Array
(
[session] => Array
(
[dbsessionhash] => 99760b6f1c5d05163475abb143ce8f5a
[userid] => 17256
)

[response] => Array
(
[errormessage] => Array
(
[0] => redirect_login
[1] => Demouser
)

)

)

My problem is that I'm stuck in there because what I want is when I click the link to access the forums I still see the login and pasword textboxes so something has not been done properly.

I suposse I'm not creating a real session. Could someone point me in the right direction? What I need is access my vBulletin and appear logged when I click my forum link from the website I'm calling the API login_login method.

Thank you very much in advance
Reply With Quote
  #2  
Old 07-02-2013, 09:40 PM
acalero acalero is offline
 
Join Date: Jun 2013
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So none could point me in the right direction? I see in the session table there is a new record with all the proper values, the only strange thing i see is the IP address is the one from the server i realize the curl action (the one that authenticates first the username and password).

Is there any way I could use those values to force one authentication at my vbulletin site once i click my forum link?

Thank you very much
Reply With Quote
  #3  
Old 07-02-2013, 09:57 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can't really set cookies cross domain... normally.
Reply With Quote
  #4  
Old 07-03-2013, 04:36 AM
acalero acalero is offline
 
Join Date: Jun 2013
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

It's not cross domain. Both elements are sharing the same domain.

http://www.domain.com/a -> source place where people is login
http://www.domain.com/vbulletin -> my vbulletin

So from http://www.domain.com/a/login.php the process I'm following is:

1. I call http://www.domain.com/vbulletin/api.php
2. I am using login_login and passing the proper parameters
3. I recive a dbsessionhash and the userid that are stored at the session table

When I check in the table, the only thing I notice is the IP address is the host one, because is the one calling api.php.

My goal is one I do http://www.domain.com/a/login.php and I go http://www.domain.com/vbulletin, the user appears logged, so I suposse I just need to force the session or the cookie in some way, but I still don't know how to do it.

Could anyone point me in the right direction?

Thank you very much
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04657 seconds
  • Memory Usage 2,186KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete