Plack::Middleware::OAuth::UserInfo
my $userinfo = Plack::Middleware::OAuth::UserInfo->new( token => $token , config => $provider_config ); my $info_hash = $userinfo->ask( 'Twitter' ); # load Plack::Middleware::OAuth::UserInfo::Twitter my $info_hash = $userinfo->ask( 'GitHub' ); # load Plack::Middleware::OAuth::UserInfo::GitHub my $info_hash = $userinfo->ask( '+FullQualified::CustomUserInfoQuery' );
In the customized user info query class should implement query method for querying user info.
Create a new Interface with current token and OAuth provider config.
Returns interface object.
Create a new query interface object and ask for user infomation.
Returns hashref.
To install Plack::Middleware::OAuth, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::OAuth
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::OAuth
For more information on module installation, please visit the detailed CPAN module installation guide.