@Override
    public Authentication readAuthentication(final ServerCall<?, ?> call, final Metadata headers) {
        final String header = headers.get(AUTHORIZATION_HEADER);

        if (header == null || !header.toLowerCase().startsWith(PREFIX)) {
            log.debug("No bearer auth header found");
            return null;
        }

        // Cut away the "bearer " prefix
        final String accessToken = header.substring(PREFIX_LENGTH);

        // Not authenticated yet, token needs to be processed
        return tokenWrapper.apply(accessToken);
    }
Creates a new BearerAuthenticationReader with the given wrapper function.
<p>
<b>Example-Usage:</b>
</p>

For spring-security-web:

<pre>
<code>new BearerAuthenticationReader(token -&gt; new PreAuthenticatedAuthenticationToken(token, null))</code>
</pre>

For spring-security-oauth2-resource-server:

<pre>
<code>new BearerAuthenticationReader(token -&gt; new BearerTokenAuthenticationToken(token))</code>
</pre>

@param tokenWrapper The function used to convert the token (without bearer prefix) into an {@link Authentication}
       object.
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/security/authentication/BearerAuthenticationReader.java