FAQ
Hi,



Is the set_authenticated method really private? I am puzzled because in
the documentation for Catalyst::Plugin::Authentication there is an
example using this method -



$user = $c->find_user({ id => $id });

$c->set_authenticated($user); # logs the user in and calls
persist_user



Yet, later on it is listed as an internal method, with the usual caveats
-



INTERNAL METHODS



These methods are for Catalyst::Plugin::Authentication INTERNAL USE
only. Please do not use them in your own code, whether application or
credential / store modules. If you do, you will very likely get the
nasty shock of having to fix / rewrite your code when things change.
They are documented here only for reference.



$c->set_authenticated( $user, $realmname )



Well, I am using it anyway!



Thanks,

Bill.


Aptina (UK) Limited, Century Court, Millennium Way, Bracknell, Berkshire, RG12 2XT. Registered in England No. 06570543.

This e-mail and any attachments contain confidential information and are solely for the review and use of the intended recipient. If you have received this e-mail in error, please notify the sender and destroy this e-mail and any copies.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20111005/bea1c7a9/attachment.htm

Search Discussions

  • Denny at Oct 5, 2011 at 10:42 am
    I'm using it in ShinyCMS, with the same concerns. Discussion in #catalyst when I was writing that bit of the code didn't really reach a conclusion on whether it was 'safe' to use it, but nobody had a better suggestion.

    Regards,
    Denny

    --
    Sent from my phone. Please excuse terseness, typos and top-posting.

    Bill Corr wrote:
    Hi,



    Is the set_authenticated method really private? I am puzzled because in
    the documentation for Catalyst::Plugin::Authentication there is an
    example using this method -



    $user = $c->find_user({ id => $id });

    $c->set_authenticated($user); # logs the user in and calls
    persist_user



    Yet, later on it is listed as an internal method, with the usual
    caveats
    -



    INTERNAL METHODS



    These methods are for Catalyst::Plugin::Authentication INTERNAL USE
    only. Please do not use them in your own code, whether application or
    credential / store modules. If you do, you will very likely get the
    nasty shock of having to fix / rewrite your code when things change.
    They are documented here only for reference.



    $c->set_authenticated( $user, $realmname )



    Well, I am using it anyway!



    Thanks,

    Bill.


    Aptina (UK) Limited, Century Court, Millennium Way, Bracknell,
    Berkshire, RG12 2XT. Registered in England No. 06570543.

    This e-mail and any attachments contain confidential information and
    are solely for the review and use of the intended recipient. If you
    have received this e-mail in error, please notify the sender and
    destroy this e-mail and any copies.
    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Stephen Clouse at Oct 5, 2011 at 4:53 pm

    On Wed, Oct 5, 2011 at 5:42 AM, Denny wrote:

    Discussion in #catalyst when I was writing that bit of the code didn't
    really reach a conclusion on whether it was 'safe' to use it, but nobody had
    a better suggestion.
    Set up a separate authentication realm that doesn't require a password.

    my $auth_config = {
    default_realm => 'normal',
    realms => {
    normal => {
    credential => {
    class => 'Password',
    password_field => 'password',
    password_type => 'self_check',
    },
    store => {
    class => 'DBIx::Class',
    user_model => 'MyDB::User',
    },
    },
    nopass => {
    credential => {
    class => 'Password',
    password_type => 'none',
    },
    store => {
    class => 'DBIx::Class',
    user_model => 'MyDB::User',
    },
    },
    },
    };

    $c->authenticate({ id => $id },'nopass');

    --
    Stephen Clouse <stephenclouse@gmail.com>
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20111005/5dd709a4/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedOct 5, '11 at 9:02a
activeOct 5, '11 at 4:53p
posts3
users3
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase