My problem is that I need to provide cross-realm authentication. A script in one domain, will authenticate and redirect users to different domains. This is for webmail, and cross realm is a necessity.

So i've got my first script, it lives in one domain, everyone comes there and fills in their user/pass. It then validates this info and then redirects the user to a script living in the domain of choice (this is defined per user along with their user/pass). The second script will then will either set a cookie or be the PerlAuthenHandler to actually grant the access token. Cookies and Basic HTTP Auth aren't cross-realm, so a trick like this is necessary. Besides, it's what I think Hotmail/Passport is doing.

So, because sensitive info will be passed around (i'll be passing encrypted data and stuff for validation) between the first and second script, i'd rather it not be a GET request. How can I send a redirect to the browser and have it submit my info as a POST request to the second script?


In reply to POST redirect for auth by theirpuppet

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.