@Override
    public Authentication readAuthentication(final ServerCall<?, ?> call, final Metadata headers)
            throws AuthenticationException {
        final String header = headers.get(AUTHORIZATION_HEADER);
        if (header == null || !header.toLowerCase().startsWith(PREFIX)) {
            log.debug("No basic auth header found");
            return null;
        }
        final String[] decoded = extractAndDecodeHeader(header);
        return new UsernamePasswordAuthenticationToken(decoded[0], decoded[1]);
    }
Reads {@link UsernamePasswordAuthenticationToken basic auth credentials} from the request.

@author Daniel Theuke (daniel.theuke@heuboe.de)
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/security/authentication/BasicGrpcAuthenticationReader.java