Yes, Thanks, I have dereferenced the email and everything looks fine. but i would like to know if any one has worked on the Net::Oauth2::client. I will need to send multi values scopes instead of single valued scopes. Can you let me know if you have fixed this single values scopes vs multivalued scopes issues in Net::Oauth2:Client? I am getting 400 BAD request from authorization server. It does mean client unable to send required parameters to Authorization server.

How can I use multi-values scopes in your Net::OAUTH2::Client? Below Subroutine is working fine.

sub client ($){ $id = route_parameters->get('site_id'); $site_id = $id; #my $site_config = config->{sites}{$site_id} || {}; my $redirect = uri_for("/got/$site_id"); $redirect =~ s,/dispatch\.cgi,,; Net::OAuth2::Profile::WebServer->new( client_id => 'xxxxxxxxxxxxxxxxxxxxx', client_secret => 'xxxxxxxxxxxxxx +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 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', scope => 'okta.users.read', state => '1234', redirect_uri => $redirect );

But below subroutines is not working but my requirement is to send multivalued as scope. Its throwing 400 BAD request.

sub client ($){ $id = route_parameters->get('site_id'); $site_id = $id; #my $site_config = config->{sites}{$site_id} || {}; my $redirect = uri_for("/got/$site_id"); $redirect =~ s,/dispatch\.cgi,,; my @scopeval = ('okta.users.read', 'okta.apps.read'); Net::OAuth2::Profile::WebServer->new( client_id => 'xxxxxxxxxxxxxxxxxxxxxxxxxxx', client_secret => 'xxxxxxxxxxxxxx +xxxxxxxxxxxxxxxxxxxxxxxxx', 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', scope => @scopeval, state => '1234', redirect_uri => $redirect ); }

In reply to Re^20: 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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.