An error occurred while loading the file. Please try again.
-
Alexey igrychev authored
Existing helm.sh/hook-delete-policy annotation variables (hook-failed, hook-succeeded) do not allow to leave failed jobs for debugging without blocking the next job launching: every failed job must be deleted manually before the next related release is launching (installing, updating or rolling back). New policy, before-hook-creation, removes the hook from previous release if there is one before the new hook is launched and can be used with another variable.
1d4883bf
<?php
require __DIR__ . '/vendor/autoload.php';
use \Firebase\JWT\JWT;
class FirebaseRS256 {
function __construct() {
$this->private_key = file_get_contents('private.pem');
$this->public_key = file_get_contents('public.pem');
}
function encodeJwt($tokenObj) {
return JWT::encode($tokenObj, $this->private_key, 'RS256');
}
function decodeJwt($token) {
// Explicitly configured to be vulnerable:
// we expect a RS256 signature, but also accept a HS256 signature.
return JWT::decode($token, $this->public_key, ['RS256', 'HS256']);
}
}