Catalyst-Plugin-OAuth2-ResourceServer

 view release on metacpan or  search on metacpan

AGENTS.md  view on Meta::CPAN

change does what it claims. A change is not done until `prove -lr t` is green.

## Build and test

    cpanm --installdeps .                          # dependencies
    prove -lr t                                    # the suite
    PERL_CRITIC_TEST=1 prove -l t/perl_critic.t    # style gate

## Conventions

- Perl 5.36+; subroutine signatures. Moo with MooX::StrictConstructor for OO; Try::Tiny over bare `eval`. JWTs via Crypt::JWT.
- Four-space soft tabs, no hard tabs, no trailing whitespace, newline at EOF.
- POD and comments are ASCII-only: rewrite prose rather than adding non-ASCII
  characters (no em dashes).
- Perl::Critic severity 3 (see `.perlcriticrc`); keep the critic test clean
  rather than scattering `## no critic`.

## Versioning and releases

- The version lives in every module's `$VERSION` (they move together) and is
  read from the main module by `Makefile.PL`.

META.json  view on Meta::CPAN

      },
      "runtime" : {
         "requires" : {
            "Carp" : "0",
            "Catalyst::Runtime" : "5.90000",
            "Crypt::JWT" : "0",
            "JSON::MaybeXS" : "0",
            "Moo" : "0",
            "MooX::StrictConstructor" : "0",
            "Scalar::Util" : "0",
            "Try::Tiny" : "0",
            "URI" : "0",
            "namespace::clean" : "0",
            "perl" : "5.036"
         }
      },
      "test" : {
         "requires" : {
            "HTTP::Request::Common" : "0",
            "Moose" : "0",
            "Test::Fatal" : "0",

META.yml  view on Meta::CPAN

    - t
    - inc
requires:
  Carp: '0'
  Catalyst::Runtime: '5.90000'
  Crypt::JWT: '0'
  JSON::MaybeXS: '0'
  Moo: '0'
  MooX::StrictConstructor: '0'
  Scalar::Util: '0'
  Try::Tiny: '0'
  URI: '0'
  namespace::clean: '0'
  perl: '5.036'
resources:
  bugtracker: https://github.com/fleetfootmike/Catalyst-Plugin-OAuth2-ResourceServer/issues
  homepage: https://github.com/fleetfootmike/Catalyst-Plugin-OAuth2-ResourceServer
  repository: https://github.com/fleetfootmike/Catalyst-Plugin-OAuth2-ResourceServer.git
version: '0.003'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

Makefile.PL  view on Meta::CPAN

    ABSTRACT         => 'MCP-profile OAuth 2.1 Resource Server plugin for Catalyst',
    AUTHOR           => 'Mike Whitaker <mike@altrion.org>',
    LICENSE          => 'perl_5',
    MIN_PERL_VERSION => '5.036',
    PREREQ_PM => {
        'Moo'                    => 0,
        'MooX::StrictConstructor' => 0,
        'namespace::clean'       => 0,
        'Carp'                   => 0,
        'Scalar::Util'           => 0,
        'Try::Tiny'              => 0,
        'Crypt::JWT'             => 0,
        'JSON::MaybeXS'          => 0,
        'URI'                    => 0,
        'Catalyst::Runtime'      => '5.90000',
    },
    TEST_REQUIRES => {
        'Test::More'            => '0.98',
        'Test::Fatal'           => 0,
        'HTTP::Request::Common' => 0,
        'Moose'                 => 0,

cpanfile  view on Meta::CPAN

requires 'perl', '5.036';
requires 'Moo';
requires 'MooX::StrictConstructor';
requires 'namespace::clean';
requires 'Carp';
requires 'Scalar::Util';
requires 'Try::Tiny';
requires 'Crypt::JWT';
requires 'JSON::MaybeXS';
requires 'URI';
requires 'Catalyst::Runtime', '5.90000';

on test => sub {
    requires 'Test::More', '0.98';
    requires 'Test::Fatal';
    requires 'HTTP::Request::Common';
    requires 'Moose';

lib/Catalyst/Plugin/OAuth2/ResourceServer.pm  view on Meta::CPAN

package Catalyst::Plugin::OAuth2::ResourceServer;
use v5.36;
use Scalar::Util qw/blessed/;
use JSON::MaybeXS ();
use Try::Tiny;
use URI ();
use Catalyst::Plugin::OAuth2::ResourceServer::Server;
use Catalyst::Plugin::OAuth2::ResourceServer::Error;

our $VERSION = '0.003';

my $CONFIG_KEY = 'Catalyst::Plugin::OAuth2::ResourceServer';
my $SLOT       = 'Catalyst::Plugin::OAuth2::ResourceServer/ctx';
my $JSON       = JSON::MaybeXS->new( utf8 => 1, canonical => 1 );

lib/Catalyst/Plugin/OAuth2/ResourceServer/Server.pm  view on Meta::CPAN

package Catalyst::Plugin::OAuth2::ResourceServer::Server;
use v5.36;
use Moo;
use Carp ();
use Try::Tiny;
use Crypt::JWT qw/decode_jwt/;
use Catalyst::Plugin::OAuth2::ResourceServer::Error;

our $VERSION = '0.003';

has signing_key => ( is => 'ro', required => 1 );
has resource    => ( is => 'ro', required => 1 );
has issuer      => ( is => 'ro', required => 1 );
has jwt_alg     => ( is => 'ro', default => 'HS256' );
has leeway      => ( is => 'ro', default => 0 );



( run in 1.817 second using v1.01-cache-2.11-cpan-5fbc6bb55f2 )