class ReactiveOAuth2AccessTokenParser implements ReactiveUserTokenParser, ReactiveAuthenticationSupplier {

    private final AccessTokenManager accessTokenManager;

    @Override
    public Mono<ParsedToken> parseToken(ServerWebExchange exchange) {<FILL_FUNCTION_BODY>}

    @Override
    public Mono<Authentication> get(String userId) {
        return Mono.empty();
    }

    @Override
    public Mono<Authentication> get() {
        return Mono
                .deferContextual(context -> context
                        .<ParsedToken>getOrEmpty(ParsedToken.class)
                        .filter(token -> "oauth2".equals(token.getType()))
                        .map(t -> accessTokenManager.getAuthenticationByToken(t.getToken()))
                        .orElse(Mono.empty()));
    }
}


        String token = exchange.getRequest().getQueryParams().getFirst("access_token");
        if (!StringUtils.hasText(token)) {
            token = exchange.getRequest().getHeaders().getFirst(HttpHeaders.AUTHORIZATION);
            if (StringUtils.hasText(token)) {
                String[] typeAndToken = token.split("[ ]");
                if (typeAndToken.length == 2 && typeAndToken[0].equalsIgnoreCase("bearer")) {
                    token = typeAndToken[1];
                }
            }
        }

        if (StringUtils.hasText(token)) {
            return Mono.just(ParsedToken.of("oauth2", token));
        }

        return Mono.empty();
    
<no_super_class>