Hello Masters, I was unable to execute the below get method from app.psgi file of my Dancer2 App but the same was executed fine in webapp.pm. The main goal is to access the query.tt for landing the webapp after Net.OAUTH.client activities Can you please check and let me know what i am missing in app.psgi file? The
#!/usr/bin/env perl use strict; use warnings; use FindBin; use lib "$FindBin::Bin/../lib"; use webapp; use Net::OAuth2::Client; use Plack::Builder; use Plack::Request; use Dancer2; use URI; use HTML::Entities; use Data::Dumper; builder { get '/:site_id' => sub { my $id = route_parameters->get('site_id'); redirect client(params->{$id})->authorize; }; sub client ($){ my $id = route_parameters->get('site_id'); my $site_id = $id; Net::OAuth2::Profile::WebServer->new( client_id => 'xxxxxxxxxxxxxxx', client_secret => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', authorize_url => 'https://dev.oktapreview.com/oauth2/ +v1/authorize', access_token_url => 'https://dev.oktapreview.com/oauth2/v1/token +', response_type => 'code', grant_type => 'authorization_code', ); } webapp->to_app; }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |