Question on Login behavior

  • Mandle
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 10 months ago #1 by Mandle
Question on Login behavior was created by Mandle
I am new to Joomla1.6/Joomdle.5/Moodle2.0 running on Ubuntu 10.10 64-bit and am unfamiliar with the login/logout behavior once it is all working together. Much time to get to this point and I'm not sure if it is all together correctly.

Currently I can not login on the Joomla! home page Login Form as "admin" (bottom left of the page. When I enter the "admin" and the password, then click LogIn, I get returned to the home page without getting logged in.

But, I can login to Joomla! when using the URL https://mysite/administrator/index.php

Question: Is this normal for the admin user?


Also, I can login to Moodle as admin with a different password that I set for Moodle.

Question: Are separate Admin logins used normally for Moodle and Joomla?


How or where are non-admin users added with this setup? In Joomla/Moodle or joomdle?
I would like the user to login with Joomla, then end up at the Moodle course if possible.

I added a test user to Joomla which is also in Joomdle and Moodle User menus. I used the "Add users to Moodle" button in the Joomdle->Users screen for "admin" and the test user.
When Logging in through the Joomla homepage with the test user I receive "Invalid Token", but login to Moodle's home page works OK.
I double checked the token in Moodle->Plugins->WebServices->ManageTokens with the entry in Joomdle->Configuration->Moodle2.0authtoken and they match. Also, the Moodle Live Logs show webservice connections.

Question: Should the test user login from Joomla's home page be redirected to Moodle?


Pardon the length of this post, it's been a long night.

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

More
14 years 10 months ago #2 by Chris
Replied by Chris on topic Re: Question on Login behavior
Hi there,

Admin IDs are different between Moodle and Joomla - they are not syncronised. Also, it would be a good habit to have different front end / back end ids. Ie admin for backend and users for front end.

For students you can choose Joomla or Moodle to be the master. It would appear more logical for most that Joomla be treated as the master and thus the users will be created through the registration process in Joomla.

Also you say you are using Joomdle R0.5. Do you mean Joomdle for Joomla 1.6 Alpha?

If the integration is fine, when logging into Joomla you should be logged into Moodle as well.

Note: You will want to use different browsers (perhaps chrome and ff) to avoid session conflicts between Moodle users and Moodle admin.

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

  • Mandle
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 10 months ago #3 by Mandle
Replied by Mandle on topic Re: Question on Login behavior
Some Good things: (Thank You)

- The Joomla adminstrator login on the backend works OK via administrator/index.php.
- The separate Moodle administrator login works for Moodle.
- A new user registered from Joomla can login to Moodle via Moodle's home page only.
- Using different browsers for admin and regular users stopped the "Invalid token" errors.

Yes, I am using the 0.5 Joomdle for Joomla 1.6 Alpha


But a Regular User can't login from Joomla:
- When a regular user logs in from the Joomla home page with an incorrect password, the incorrect login message is displayed (Good).
- When a regular user logs in from the Joomla home page with a Correct password the login page reappears with the user not logged in - (Not Good, but no error).

The user is apparently authenticated, but not directed to moodle.
The apache logs show what looks like calls to joomdle functions and moodle.
No errors were found in the Joomla logs.

127.0.0.1 TLSv1 DHE-RSA-AES256-SHA - "POST /joomla/moodle/webservice/xmlrpc/server.php?wstoken=f1fe4709....18dd5aabce HTTP/1.0" 131
10.1.1.1 TLSv1 AES256-SHA - "POST /joomla/index.php?Itemid=435 HTTP/1.1" 20
127.0.0.1 TLSv1 DHE-RSA-AES256-SHA - "POST /joomla/index.php?option=com_joomdle&task=ws.server&format=xmlrpc HTTP/1.0" 151
127.0.0.1 TLSv1 DHE-RSA-AES256-SHA - "POST /joomla/index.php?option=com_joomdle&task=ws.server&format=xmlrpc HTTP/1.0" 162
10.1.1.1 TLSv1 AES256-SHA - "GET /joomla/moodle/auth/joomdle/land.php?username=testuser&token=399aebec81a39...bbc0f&use_wrapper=0&create_user=0&wantsurl=index.php%3FItemid%3D435 HTTP/1.1" 354

This appears after the above line and looks like a reload of the joomla home page:
10.1.1.1 TLSv1 AES256-SHA - "GET /joomla/index.php?Itemid=435 HTTP/1.1" 3570
10.1.1.1 TLSv1 AES256-SHA - "GET /joomla/media/system/js/core.js HTTP/1.1" 1465
...

I'm not sure if the Joomdle integration is working, so I doublechecked the joomdle plugins and modules but could not find them in the Joomla Extension Manager - even though messages indicated that they were installed correctly.
I had used the method of placing them in the Joomla temp directory and Installing them with the Extension Manager "Install from Directory" option per advise from an older thread.


Are there any clues above as to why a regular user can't login via the Joomla Home page and why the redirect to Moodle is not working?

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

More
14 years 10 months ago #4 by Chris
Replied by Chris on topic Re: Question on Login behavior
What login module are you using? Ie CB, JS, Joomla native, etc. ?
What options have you set in your joomdle configuration for SSO?

Regardless of the above, when logging into Joomla, the user should not be automatically redirected to moodle unless you have defined that somewhere. The users should remain in Joomla to do their Joomla "stuff". Then perhaps from the my courses modules or other links you have created, be taken to moodle upon clicking on those links.

c

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

  • Mandle
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 10 months ago #5 by Mandle
Replied by Mandle on topic Re: Question on Login behavior
Chris,

Answers to your questions:
The Joomla login module in use is Joomla native.
The SSO setting in Moodle "Use redirectless SSO" is set to No.

Thanks for clarifying the behavior of Joomla/Joomdle/Moodle.


Some results of further login testing:
=====================================
What should happen if a User that is defined in Joomla, Joomdle, and Moodle logs in from the Joomla login? Should the "Hi Username" show up in the bottom left of the Joomla homepage?

I have found that if I login to my Joomla homepage, it re-appears without logging in.
But, If I login to Moodle with the same user ID, it logins in OK.
Then something strange happens - If I go back to the Joomla homepage the user's Name appears in the Hi message right above the "Logout" button.
If I click on the Logout button on the Joomla home page, it redisplays, but nothing happens.
I can logout from the Moodle homepage OK.
But - when I go back to the Joomla homepage it still says I'm logged in!!
(But I can't logout from Joomla using the Logout button).

When I login as the Joomla Administrator from another computer, I see that Joomla thinks a "front-end" user is logged in. I can click the "Logout" button in the "Last 5 Logged-In Users" section and logout the user. (This logout is confirmed on the Joomla homepage for the user session).

Is this a symptom of a something missing?
( Joomla is aware of a Moodle user logging in, but Moodle is not aware of a Joomla login )

Does the part of my Apache log posted show anything interesting?
( The XMLRCP and GET /joomla/moodle/auth for testuser appears to get called without an error )


Many Thanks.

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

More
14 years 10 months ago #6 by Antonio Durán
Replied by Antonio Durán on topic Re: Question on Login behavior
Hi.

Just in case: check that you are not having "different domains" problems.
What I mean is that you should always use " www.site.com " or "site.com",as the 2 are different, and thus have different sessions.

For your comments, it seems like you are going to one domain to log, and then redirected to the other.

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

  • Mandle
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 10 months ago #7 by Mandle
Replied by Mandle on topic Re: Question on Login behavior
Here are the URL settings that I could find:

Joomla Site Name: testsite.com/joomla (Joomla Global Config Site Settings)
Joomdle in Joomla: testsite.com/joomla/moodle (Moodle URL in General Config)
Moodle: testsite.com/joomla/moodle (config.php Moodle Homepage)
Joomdle in Moodle: testsite.com/joomla (Joomla server URL)

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

More
14 years 10 months ago #8 by Antonio Durán
Replied by Antonio Durán on topic Re: Question on Login behavior
You asked:
What should happen if a User that is defined in Joomla, Joomdle, and Moodle logs in from the Joomla login? Should the "Hi Username" show up in the bottom left of the Joomla homepage?

Yes, it should, as any other joomla user.

If you are not being logged, and the press "Back" and are logged, that is very strange.
I would check the url bar in every step, to see if something changes.

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

  • Mandle
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 10 months ago #9 by Mandle
Replied by Mandle on topic Re: Question on Login behavior
I'll try to rephrase my situation:

All Joomla Logins/Logouts don't work.
But an incorrect password gives an incorrect password error,
and a correct password redisplays the Joomla homepage without an error, but user not logged in.

All Moodle Logins/Logouts work OK.

After a Moodle user Logs in from the moodle homepage ( testsite.com/joomla/moodle ),
then goes to the Joomla homepage ( testsite.com/joomla ), the "Hi Username" is shown correctly including the Logout button.

After a Moodle user Logs out from the moodle homepage ( testsite.com/joomla/moodle ),
The "Login" Form is displayed on the Joomla homepage ( testsite.com/joomla ).

Anotherwords, Moodle logins and logouts are recognized by Joomla. I think Joomdle is passing the user's information from Moodle to Joomla OK.


As far as what appears in the URL:
1. What I type: testsite.com/joomla
2. The URL remains the same for the initial load
3. After I attempt a Joomla login the URL changes to testsite.com/joomla/index.php?Itemid=435 The page appears the exact same.

The Apache logs I posted earlier in this thread shows what is happening behind the scenes with some to localhost 127.0.0.1 and some back to me at 10.1.1.
I think the localhost calls are to moodle and joomdle.

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