Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

How to compare cb login user with user from outside

  • mbongio
  • mbongio
  • OFFLINE
  • Posts: 52
  • Thanks: 2
  • Karma: 0
8 years 10 months ago #275929 by mbongio
We need to validate users from outside in the Joomla site. How can we compare the user credentials.
What encryption does cb register do while creating users.

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
8 years 10 months ago #275941 by nant

mbongio wrote: We need to validate users from outside in the Joomla site. How can we compare the user credentials.
What encryption does cb register do while creating users.


CB does not do anything different than Joomla.
In fact it uses Joomla functions to authenticate.

You would need to code a Joomla plugin to do this.
I think Joomla has some built-in authentication plugins you or your developers can study.
See Joomla plugins - Authentication Gmail, Authentiaction LDAP

Not much more I can offer on this Joomla related subject.

Please Log in or Create an account to join the conversation.

  • mbongio
  • mbongio
  • OFFLINE
  • Posts: 52
  • Thanks: 2
  • Karma: 0
8 years 9 months ago - 8 years 9 months ago #276594 by mbongio
We tried using the authenticate plugin functions of Joomla and validate user credentials.
However we need to login the user to the site.
We tried using Curl Login method and we are getting error
Session expired or cookies are not enabled in your browser. Please press "reload page" in your browser, and enable cookies in your browser. Please refresh/reload page before filling-in.

Also we found when posting login data that the login form has hidden field cbsecuritym3 which is generated whenever we call the login page. Is this used the cb_login module to login user to the site.

We have a Joomla site and an eDirectory site. Users can login to eDirectory site using Joomla credentials. So from that site when they access the Joomla community site, they need to be looged in to the site. They should not need to login again to access the Joomla community site.
Last edit: 8 years 9 months ago by mbongio.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 9 months ago #276647 by krileon
You need to write an authentication plugin to fit your needs. You can not login to Joomla/CB for a user that does not exist. The way these authentication plugins work is they valid the credentials then create a basic user on the site to allow login.

There's no functionality in Joomla to login externally. You would need a RESTful API to do that. A session needs to be created and a cookie needs to be generated to link the session to the browser. Without that they will never appear to be logged in.

CB Auto Actions maybe able to do this by creating a login action and calling its direct URL to trigger the login, but I've no idea if that'll truly work to generate the cookie and session properly for your usecase.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • mbongio
  • mbongio
  • OFFLINE
  • Posts: 52
  • Thanks: 2
  • Karma: 0
8 years 9 months ago #276825 by mbongio
The user will be already registered in Joomla database. However in the scenario when they try to access Joomla community from another site they should not be asked to login again. They are already logging to the eDirectory site with the login details of Joomla. eDirectory through rest services sends us the info which we are able to validate. User is provided access to eDirectory and he may browse the page. Now if he clicks on the link which leads to Community site where he should not be asked to login again but shown as logged in.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 9 months ago #276844 by krileon
This really is more of a question for Joomla and not CB. See my above reply for possible usage with CB, but beyond that you need something that generates the Joomla session and the cookie associated with that session. Either way you will likely need to custom code something to do this.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum