private ServerWebExchange writeToken(final ServerWebExchange exchange, final OAuth2AuthorizedClient client) {
        ServerHttpRequest.Builder mutate = exchange.getRequest().mutate();
        mutate.header(HttpHeaders.AUTHORIZATION, BEARER + client.getAccessToken().getTokenValue());
        return exchange.mutate().request(mutate.build()).build();
    }
Instantiates a new oauth2 plugin.

@param authorizedClientServiceProvider the authorized client service provider
shenyu-plugin/shenyu-plugin-security/shenyu-plugin-oauth2/src/main/java/org/apache/shenyu/plugin/oauth2/OAuth2Plugin.java