class GoogleTokenProvider extends SynchronousProvider implements AuthenticationProvider, OutboundSecurityProvider {

    @Override
    protected AuthenticationResponse syncAuthenticate(ProviderRequest providerRequest) {
        Optional<String> maybeToken;
        try {
            maybeToken = tokenHandler.extractToken(providerRequest.env().headers());
        } catch (Exception e) {
            return failInvalidRequest(e);
        }

        SecurityContext sContext = providerRequest.securityContext();
        return maybeToken
                .map(token -> cachedResponse(token, sContext.tracer(), sContext.tracingSpan()))
                .orElseGet(this::failNoToken);

    }

    private  GoogleTokenProvider(Builder builder);

}