I am managing about 5 different Catalyst apps and we're now finally getting into a serious look at authentication.

The easiest thing would be to simply LDAP authenticate against Active Directory but the company doesn't even have roles set up. When authenticating against AD, it requires two binds, the first being a user and password that simply can bind to AD and the next being the actual user name and password. The company is happy with doing this single bind using the user name and password and I went ahead and built that using Net::LDAP. The idea being that if they have put in a valid user name and password that they are then authorized to use the app.

What they're after is the ability to authenticate once and then you can just redirect to whatever app you want to use.

I know using DBIC that I could just create one app and have it authenticate and we could just store the session id in a separate database and from there go on to whatever app they want to use. Question is jumping into a new catalyst app after authenticating from another one and I'm not so sure that just having that session id alone is enough.

The more I think about it the more that this seems to make sense.....
- Fire up the authentication app.
- Take the user name and password and upon successful login store the user name, password and session id in the authentication db
- Redirect to the requested app (sending the user name and password along with it somehow) and use the authentication db as the store.

Given that we're storing a user name, password and session id already in a table after initial authentication, could we just use that session id to bring someone entry into another catalyst app?

Anyone familiar enough with process to throw in some advice? I really appreciate it.


In reply to Authenticating for multiple Catalyst apps by sherab

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.