Catalyst-Plugin-OpenIDConnect
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/OpenIDConnect/Utils/Store.pm view on Meta::CPAN
package Catalyst::Plugin::OpenIDConnect::Utils::Store;
use strict;
use warnings;
use Moose;
use namespace::autoclean;
use Try::Tiny;
use Bytes::Random::Secure qw(random_bytes);
use MIME::Base64 qw(encode_base64url);
with 'Catalyst::Plugin::OpenIDConnect::Role::Store';
=head1 NAME
Catalyst::Plugin::OpenIDConnect::Utils::Store - In-process memory store for OIDC state
=head1 DESCRIPTION
Provides in-process memory storage for authorization codes and OIDC session
state. Suitable for development and single-process deployments.
B<Not suitable for multi-process servers such as FastCGI or pre-forking>
because each worker process has its own independent copy of the data.
For those deployments, use L<Catalyst::Plugin::OpenIDConnect::Utils::Store::Redis>
or another shared-backend store that consumes
L<Catalyst::Plugin::OpenIDConnect::Role::Store>.
=head1 ATTRIBUTES
=head2 codes
Storage for authorization codes (code => {client_id, user, scope, ...})
=cut
has codes => (
is => 'ro',
isa => 'HashRef',
default => sub { {} },
);
=head2 sessions
Storage for user sessions (session_id => {user, tokens, ...})
=cut
has sessions => (
is => 'ro',
isa => 'HashRef',
default => sub { {} },
);
=head2 logger
Optional logger instance for debug/info logging.
=cut
has logger => (
is => 'ro',
isa => 'Maybe[Object]',
required => 0,
);
# Private storage for refresh token JTIs (MED-1).
( run in 0.773 second using v1.01-cache-2.11-cpan-5fbc6bb55f2 )