Mojolicious::Plugin::OAuth2::Mock - Mock an Oauth2 and/or OpenID Connect provider
use Mojolicious::Plugin::OAuth2::Mock; use Mojolicious; my $app = Mojolicious->new; Mojolicious::Plugin::OAuth2::Mock->apply_to($app);
Mojolicious::Plugin::OAuth2::Mock is an EXPERIMENTAL module to make it easier to test your Mojolicious::Plugin::OAuth2 based code.
Mojolicious::Plugin::OAuth2::Mock->apply_to($app, \%provider_args); $mock->apply_to($app, \%provider_args);
Used to add mocked routes to a Mojolicious application, based on all the keys in %provider_args that end with "_url". Example:
%provider_args
* authorize_url => /mocked/oauth/authorize * authorization_endpoint_url => /mocked/oauth2/authorize * end_session_endpoint_url => /mocked/oauth2/logout * issuer_url => /mocked/oauth2/v2.0 * jwks_url => /mocked/oauth2/keys * token_url => /mocked/oauth/token * token_endpoint_url => /mocked/oauth2/token
Mojolicious::Plugin::OAuth2.
To install Mojolicious::Plugin::OAuth2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::OAuth2
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::OAuth2
For more information on module installation, please visit the detailed CPAN module installation guide.