Java spring boot create refresh token api

Hello, i’m on java spring boot, i’m able to create access token, protect routes and so on, but i can’t find api to create a refresh token, i looked for docs on the internet, but something is missing to me. have you got any suggestions?

here is the part of code class i use to generate the token with proper imports:

import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTCreator;
import com.auth0.jwt.algorithms.Algorithm;

    public static String createJwt(String subject, Map<String, Object> payloadClaims) {
        JWTCreator.Builder builder = JWT.create().withSubject(subject).withIssuer(issuer);
        final DateTime now =;

        if (payloadClaims.isEmpty()) {
            log.warn("You are building a JWT without header claims");
        for (Map.Entry<String, Object> entry : payloadClaims.entrySet()) {
            builder.withClaim(entry.getKey(), entry.getValue().toString());
        return builder.sign(Algorithm.HMAC256(JwtProvider.secret));

thanks everyone