Sir, Can you please advice how can i enable OIDC Auth in app.psgi, so that it will redirect to auhtorization server's login page?

My app.psgi

#!/usr/bin/env perl use strict; use warnings; use FindBin; use lib "$FindBin::Bin/../lib"; use Plack::Middleware; # use this block if you don't need middleware, and only have a single +target Dancer app to run here use webapp; use Plack::Builder; use Authen::Simple::ActiveDirectory; use OIDC::Lite::Client::WebServer; use Log::Log4perl; my $client1 = OIDC::Lite::Client::WebServer->new( id => q{xxxxxxxxxxxxxxxxxxxxxx}, secret => q{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}, authorize_uri => q{https://dev.preview.com/oauth2/v1/authorize} +, access_token_uri => q{https://dev.preview.com/oauth2/v1/token}, );sub start_authorize { my @array = ("https://testchandan.com:5001/"); my $your_app = shift @array ; my $redirect_url = $client1->uri_to_redirect( redirect_uri => q{https://synchronydev.oktapreview.com/}, scope => q{openid}, ); }builder { enable "Plack::Middleware::Auth::OIDC::ProtectedResource", data_handler => "webapp::DataHandler", error_uri => q{http://example.org/error/description}; enable "Plack::Middleware::JSONP"; enable "Plack::Middleware::ContentLength"; webapp->to_app; }

The above code is not working, Can you please let me know the setup?


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