return request_cache->{job_queue} ||= Bugzilla::JobQueue->new();
}
+sub jwt {
+ my ($class, @args) = @_;
+ require Mojo::JWT;
+ return Mojo::JWT->new(@args, secret => $class->localconfig->{jwt_secret});
+}
+
sub dbh {
my ($class) = @_;
=back
+=item C<jwt>
+
+Returns a L<Mojo::JWT> object, configured with the Bugzilla localconfig jwt_secret set.
+
+ my $payload_hash = Bugzilla->jwt->decode($jwt);
+ my $new_jwt = Bugzilla->jwt(claims => $payload_hash)->encode;
+
=back
# is larger than anybody would ever be able to brute-force.
default => sub { generate_random_password(64) },
},
+ {name => 'jwt_secret', default => sub { generate_random_password(64) },},
{
name => 'param_override',
default => {
security features in Bugzilla, to protect against certain types of attacks.
A random string is generated by default. It's very important that this key
is kept secret. It also must be very long.
+END
+ localconfig_jwt_secret => <<'END',
+This secret key is used to generate JWTs. It should be a long unique value.
+It should not be the same as the site_wide_secret.
END
localconfig_param_override => <<'END',
This hash is used by BMO to override select data/params values on a per-webhead