Author Topic: Redirecting the captive portal login page to another page  (Read 5693 times)

mickyfr

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Redirecting the captive portal login page to another page
« on: January 05, 2012, 02:49:44 am »
The goal is  to redirect the captive portal login to integrate with Joomla! CMS.

Is it possible to redirect the captive portal login page to another page, say , authentication through joomla login page?
Very usefull in an intranet environment with existing users.

Many thanks for your great help.

Best Regards.


mickyfr

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Redirecting the captive portal login page to another page
« Reply #1 on: January 19, 2012, 12:54:40 pm »
Hi All,

Any idea about my need  :( ?

Thank you for your help.

ichat

  • Zen Hero
  • *****
  • Posts: 795
  • Karma: +28/-16
  • RTFM!
    • View Profile
Re: Redirecting the captive portal login page to another page
« Reply #2 on: January 19, 2012, 09:53:31 pm »
zentyal is a domain controller and even though you could try to export the joomla databace to your server,   as a one time effort you would be better of leaving zentyal as it is and instead   change the joomla so that it authenticates agains zentyal's ldap instead...   
All tips hints and advices are based on my personal experience.
As I try my best to be as accurate as possible, following my advice is always at your own risk,
I claim absolutely NO responsibility in any way!

stuartiannaylor

  • Guest
Re: Redirecting the captive portal login page to another page
« Reply #3 on: January 20, 2012, 12:55:28 pm »
I agree with Ichat as the joomla LDAP would not create the correct entries.

There have been some calls for Jfusion to support LDAP but again the correct schema settings for zentyal wouldn't be set.

I guess you could have a look at the zentyal .php pages in /usr/share/zentyal and have a go but good luck with that one :)

I have Joomla authenticating against my ldap but I create the users in zentyal.

You could also import the users into zentyal. There is an import script but I forget where. Apologies but a google should find it.

I guess you could use curl and edit the captive portal script to fire the same against joomla.

 POST (HTTP)
 It's easy to post data using curl. This is done using the -d <data> option.  The post data must be urlencoded.
 Post a simple "name" and "phone" guestbook.
        curl -d "name=Rafael%20Sagula&phone=3320780"                 http://www.where.com/guest.cgi 
  How to post a form with curl, lesson #1:
 Dig out all the <input> tags in the form that you want to fill in. (There's a perl program called formfind.pl on the curl site that helps with this).
 If there's a "normal" post, you use -d to post. -d takes a full "post string", which is in the format
 <variable1>=<data1>&<variable2>=<data2>&...
 The 'variable' names are the names set with "name=" in the <input> tags, and the data is the contents you want to fill in for the inputs. The data must be properly URL encoded. That means you replace space with + and that you write weird letters with %XX where XX is the hexadecimal representation of the letter's ASCII code.
 Example:
 (page located at http://www.formpost.com/getthis/
        <form action="post.cgi" method="post"> <input name=user size=10> <input name=pass type=password size=10> <input name=id type=hidden value="blablabla"> <input name=ding value="submit"> </form> 
  We want to enter user 'foobar' with password '12345'.
 To post to this, you enter a curl command line like:
        curl -d "user=foobar&pass=12345&id=blablabla&dig=submit"  (continues) http://www.formpost.com/getthis/post.cgi 
  While -d uses the application/x-www-form-urlencoded mime-type, generally understood by CGI's and similar, curl also supports the more capable multipart/form-data type. This latter type supports things like file upload.
 -F accepts parameters like -F "name=contents". If you want the contents to be read from a file, use <@filename> as contents. When specifying a file, you can also specify the file content type by appending ';type=<mime type>' to the file name. You can also post the contents of several files in one field.  For example, the field name 'coolfiles' is used to send three files, with different content types using the following syntax:
        curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html"         http://www.post.com/postit.cgi 
  If the content-type is not specified, curl will try to guess from the file extension (it only knows a few), or use the previously specified type (from an earlier file if several files are specified in a list) or else it will using the default type 'text/plain'.
 Emulate a fill-in form with -F. Let's say you fill in three fields in a form. One field is a file name which to post, one field is your name and one field is a file description. We want to post the file we have written named "cooltext.txt". To let curl do the posting of this data instead of your favourite browser, you have to read the HTML source of the form page and find the names of the input fields. In our example, the input field names are 'file', 'yourname' and 'filedescription'.
        curl -F "file=@cooltext.txt" -F "yourname=Daniel"              -F "filedescription=Cool text file with cool text inside"              http://www.post.com/postit.cgi 
  To send two files in one post you can do it in two ways:
  • Send multiple files in a single "field" with a single field name:
  curl -F "pictures=@dog.gif,cat.gif"
 2. Send two fields with two field names:
 curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif"