Hi, Thank you but but the email id i am passing through argument. Its not taking through below code in webapp.pm, Could you please let me know the reason and advise any solution?
webapp.pm
package webapp; use Dancer2; use Op; use Op qw(api_call3); use Op1; our $accestoken = ""; my $client; our $p; our $id; our $site_id; our $value; my %common = (title => 'webapp'); get '/:site_id' => sub { my $id = route_parameters->get('site_id'); template 'query2' => { %common } ; }; get '/got/:site_id' => sub { $p = params->{code}; defined params->{code} or print "Error: Missing access code"; $id = route_parameters->get('site_id'); $site_id = params->{$id}; template 'query2' => { 'title' => 'webapp' }; }; post '/' => sub { if (body_parameters->get('Userslist') eq 'Users-list' ) { $id = route_parameters->get('site_id'); my $site_id2 = params->{$id}; @access_token = client2($site_id2)->get_access_token($p); for my $i (0..$#access_token) { $accestoken = $access_token[$i]{NOA_access_token}; } push @accesstoken , $accestoken; my $r2 = Op::api_call3(@accesstoken); my $r3 = Op::mailusersread({OKTAUsersList => param('Userslist') +, Email => param('Email')}); #template query2 => { %common, button => 'Users-list' } template result2 => { title => 'webapp', result2 => $r3 } } elsif (body_parameters->get('Apps-list') eq 'Apps') { template query2 => { %common, button => 'Apps-list' } } my %body_parameters = params('body'); # my $email3 = param('Email'); print Dumper %body_parameters; }; sub client2($) { $id = route_parameters->get('site_id'); $site_id = $id; Net::OAuth2::Profile::WebServer->new( client_id => 'xxxxxxxxxxxxxxxxxxxxxx', client_secret => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +xxxx', authorize_url => 'https://dev.oktapreview.com/oauth2/ +v1/authorize', access_token_url => 'https://dev.oktapreview.com/oauth2/v1/token +', redirect_uri => uri_for ("/got/synchronydev"), grant_type => 'authorization_code', ); } true
My body parameters are below and its not taking the value of Email
$VAR1 = 'OKTAUsersList'; $VAR2 = 'on'; $VAR3 = 'Email'; $VAR4 = [ 'chandan.ghosh@abc.com', '' ]; $VAR5 = 'Userslist'; $VAR6 = 'Users-list';
Please advise
In reply to Re^18: Need to know the process to implement perl script into web application server.
by chandantul
in thread Need to know the process to implement perl script into web application server.
by chandantul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |