Plack::Middleware::Auth::OAuth - OAuth signature validation middleware
use Plack::Builder; my $app = sub { ...}; builder { enable "Plack::Middleware::Auth::OAuth", consumer_key => 'YOUR_CONSUMER_KEY', consumer_secret => 'YOUR_CONSUMER_SECRET', validate_post => 1, ; $app; };
Plack::Middleware::Auth::OAuth is OAuth signature validation handler for Plack.
Your application's consumer key.
Your application's consumer secret.
Includes body parameters in validation. For MBGA-Town, you should use this option.
A callback function to validate oauth_nonce.
A callback function to validate oauth_timestamp.
A callback function (psgi application) for returning custom response when unauthorized.
doing only validation. not returning response directly from middleware (unauthorized method not to be called).
discriminating authorization is valid or not by seeing $env->{'psgix.oauth_authorized'} in your app.
A callback function for resolving consumer_secret. This callback takes argument: ($consumer_key, $env).
Default: 0
if true, it judge unsupported param as invalid when validating params. if false, it accepts unsupported parameters.
Hideo Kimura <hide@cpan.org> Masayuki Matsuki <songmu@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Plack::Middleware::Auth::OAuth, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::Auth::OAuth
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::Auth::OAuth
For more information on module installation, please visit the detailed CPAN module installation guide.