NAME

Catalyst::Authentication::Credential::Fallback - Try a list of AuthN Realms until one succeeds or all fail

SYNOPSIS

   # in your MyApp.pm
   __PACKAGE__->config(

       'Plugin::Authentication' => {
           default_realm => 'fallbackrealm',
           realms => {
               fallbackrealm => {
                   credential => {
                       class  => 'Fallback',
                       realms => ['remote', 'ldap', 'anotherrealm'],
                   },
               },
               # ... the other realms (remote, ldap, etc)
               # should follow, as per their own documentation ...
           },
       },
        
   );

DESCRIPTION

This module allows you to configure a sequence of authentication realms to be used in a Catalyst application. A user will be authentication against one member of the sequence, or else authentication will fail.

For example, if you have a local password database and also an LDAP server, then you can use this module to have the application try first the database, then LDAP, and finally to reject the server. Without this module you would only be able to associate the user with one authentication realm at any time.

CONFIG

class

For this module to be used, you must set this value to "Fallback".

realms

A Perl list of other realms which are tried in order, for user authentication.

You must also fully configure these realms in your application configuration!!

METHODS

authenticate ( $realmname, $authinfo )

Returns the user object if authenticated, else returns nothing.

AUTHOR

Oliver Gorwits <oliver@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Oliver Gorwits.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.