class KerberosExtractor implements CredentialsExtractor {

    /** {@inheritDoc} */
    @Override
    public Optional<Credentials> extract(final CallContext ctx) {<FILL_FUNCTION_BODY>}
}

        val optHeader = ctx.webContext().getRequestHeader(HttpConstants.AUTHORIZATION_HEADER);
        if (optHeader.isEmpty()) {
            return Optional.empty();
        }

        val header = optHeader.get();
        if (!(header.startsWith("Negotiate ") || header.startsWith("Kerberos "))) {
            // "Authorization" header do not indicate Kerberos mechanism yet,
            // so the extractor shouldn't throw an exception
            return Optional.empty();
        }

        var base64Token = header.substring(header.indexOf(" ") + 1).getBytes(StandardCharsets.UTF_8);
        var kerberosTicket = Base64.getDecoder().decode(base64Token);

        return Optional.of(new KerberosCredentials(kerberosTicket));
    
<no_super_class>