private String base64Decode(final String input) {
            final String decoded;
            try {
                decoded = new String(Base64.getDecoder().decode(input), StandardCharsets.UTF_8);
            } catch (Exception e) {
                throw new RuntimeException(LogUtil.message("input is not in BASE64 format, input: '{}': {}",
                        input, LogUtil.exceptionMessage(e)), e);
            }

            LOGGER.debug("decodedHeader: {}", decoded);
            return decoded;
        }
Verify the JSON Web Signature and then extract the user identity from it
stroom-security/stroom-security-common-impl/src/main/java/stroom/security/common/impl/StandardJwtContextFactory.java