<div dir="ltr">We had a similar problem at $work. To get what we wanted we had to stop using the HTTP plugin and do something like this (warning: hand-written, un-tested code follows) in the Root controller.<div><br></div><div>my ( $username, $password ) = $c->request->headers->authorization_basic;<br></div><div>my $logged_in_user;</div><div>if ( defined $username && defined $password ) {<br></div><div> some_method_in_users_that_concatenates_and_athenticates($username, $password);</div><div>}<br></div><div><br></div><div>if ($logged_in_user) {</div><div> $c->stash(user => $logged_in_user;</div><div> ...</div><div>}<br></div><div>else {</div><div> $c->response->header('WWW-Authenticate' => 'Basic realm="MyRealm");</div><div> $c->response->content_type('text/plain');</div><div> $c->response->status(401);</div><div> $c->detach();</div><div>}</div><div><br></div><div><br></div><div>HTH,</div><div>Dermot</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 May 2016 at 16:32, Gerhard Jungwirth <span dir="ltr"><<a href="mailto:gjungwirth@sipwise.com" target="_blank">gjungwirth@sipwise.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am using Catalyst::Authentication::Store::DBIx::Class and<br>
Catalyst::Authentication::Credential::HTTP with the following configuration:<br>
<br>
my_realm => {<br>
credential => {<br>
class => 'HTTP',<br>
type => 'basic',<br>
username_field => 'username',<br>
password_field => 'password',<br>
password_type => 'clear',<br>
},<br>
store => {<br>
class => 'DBIx::Class',<br>
user_model => 'DB::my_user_table',<br>
},<br>
},<br>
<br>
Which works great. The thing is: I want the user to authenticate in the form "username@domain:password" using HTTP Basic Authentication, where username and domain are checked against separate fields in my DBIx::Class table. (Ideally, domain is checked against a related table in my schema)<br>
<br>
Is that supported? If not, can it be added? If not, how do you suggest I implement that?<br>
<br>
Thanks and Cheers,<br>
Gerhard<br>
<br>
_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" rel="noreferrer" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/</a><br>
</blockquote></div><br></div>