Catalyst-Authentication-Credential-Flickr

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

NAME
    Catalyst::Authentication::Credential::Flickr - Flickr authentication for
    Catalyst

SYNOPSIS
    In MyApp.pm

     use Catalyst qw/
        Authentication
        Session
        Session::Store::FastMmap
        Session::State::Cookie
     /;
 
     MyApp->config(
         "Plugin::Authentication" => {
             default_realm => "flickr",
             realms => {
                 flickr => {
                     credential => {
                         class => "Flickr",
                     },

                     key    => 'flickr-key-here',
                     secret => 'flickr-secret-here',
                     perms  => 'read',
                 },
             },
         },
     );

    And then in your Controller:

     sub login : Local {
        my ($self, $c) = @_;
    
        my $realm = $c->get_auth_realm('flickr');
        $c->res->redirect( $realm->credential->authenticate_flickr_url($c) );
     }

    And finally the callback you specified in your API key request (e.g.
    example.com/flickr/ ):

     sub flickr : Local {
        my ($self, $c) = @_;
    
        $c->authenticate();
        $c->res->redirect("/super/secret/member/area");
     }

DESCRIPTION
    This module handles Flickr API authentication in a Catalyst application.

    When Catalyst::Plugin::Authentication 0.10 was released, the API had
    changed, resulting in broken code when using
    Catalyst::Plugin::Authentication::Credential::Flickr.

    This module tries to follow the guidelines of the new API and deprecate
    Catalyst::Plugin::Authentication::Credential::Flickr.

    Code changes are needed, but are fairly minimal.

METHODS
    As per guidelines of Catalyst::Plugin::Authentication, there are two
    mandatory methods, "new" and "authenticate". Since this is not really
    enough for the Flickr API, I've added one more (and an alias).

  new()
    Will not be called by you directly, but will use the configuration you
    provide (see above). Mandatory parameters are "key", "secret" and
    "perms". Please see Flickr::API for more details on them.



( run in 0.926 second using v1.01-cache-2.11-cpan-2398b32b56e )