class DefaultUserTokenGenPar implements ReactiveUserTokenGenerator, ReactiveUserTokenParser {

    private long timeout = TimeUnit.MINUTES.toMillis(30);

    @SuppressWarnings("all")
    private String headerName = "X-Access-Token";

    private String parameterName = ":X_Access_Token";

    @Override
    public String getTokenType() {
        return "default";
    }

    @Override
    public GeneratedToken generate(Authentication authentication) {
        String token = IDGenerator.MD5.generate();

        return new GeneratedToken() {
            @Override
            public Map<String, Object> getResponse() {
                return Collections.singletonMap("expires", timeout);
            }

            @Override
            public String getToken() {
                return token;
            }

            @Override
            public String getType() {
                return getTokenType();
            }

            @Override
            public long getTimeout() {
                return timeout;
            }
        };
    }

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

        String token = Optional.ofNullable(exchange.getRequest()
                .getHeaders()
                .getFirst(headerName))
                .orElseGet(() -> exchange.getRequest().getQueryParams().getFirst(parameterName));
        if (token == null) {
            return Mono.empty();
        }
        return Mono.just(ParsedToken.of(getTokenType(),token,(_header,_token)->_header.set(headerName,_token)));
    
<no_super_class>