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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |