View on
MetaCPAN
Fayland 林 > OpenSocialX-Shindig-Crypter > OpenSocialX::Shindig::Crypter

Download:
OpenSocialX-Shindig-Crypter-0.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.03   Source  

NAME ^

OpenSocialX::Shindig::Crypter - OpenSocial Shindig Crypter

VERSION ^

version 0.03

SYNOPSIS ^

    use OpenSocialX::Shindig::Crypter;

    my $crypter = OpenSocialX::Shindig::Crypter->new( {
        cipher => 'length16length16',
        hmac   => 'forhmac_sha1',
        iv     => 'anotherlength16k'
    } );
    my $token = $crypter->create_token( {
        owner    => $owner_id,
        viewer   => $viewer_id,
        app      => $app_id,
        app_url  => $app_url,
        domain   => $domain,
        module_id => $module_id
    } );

DESCRIPTION ^

Apache Shindig http://incubator.apache.org/shindig/ is an OpenSocial container and helps you to start hosting OpenSocial apps quickly by providing the code to render gadgets, proxy requests, and handle REST and RPC requests.

From the article http://www.chabotc.com/generic/using-shindig-in-a-non-php-or-java-envirionment/, we know that we can do 'Application' things in Perl. basically the stuff will be

METHODS

EXAMPLE

    use URI::Escape;
    use MIME::Base64;
    use OpenSocialX::Shindig::Crypter;

    my $crypter = OpenSocialX::Shindig::Crypter->new( {
        cipher => $config->{opensocial}->{cipherKey},
        hmac   => $config->{opensocial}->{hmacKey},
        iv     => $config->{opensocial}->{ivKey},
    } );
    my $security_token = uri_escape( encode_base64( $crypter->create_token( {
        owner   => $owner_id,
        viewer  => $viwer_id,
        app     => $gadget->{id},
        domain  => $config->{opensocial}->{container},
        app_url => $gadget->{url},
    } ) ) );

    # later in tt2 or others
    # st=$security_token

AUTHOR ^

  Fayland Lam <fayland@gmail.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2009 by Fayland Lam.

This is free software; you can redistribute it and/or modify it under the same terms as perl itself.

syntax highlighting: