class OidcCredentials extends Credentials {

    @Serial
    private static final long serialVersionUID = 6772331801527223938L;

    @EqualsAndHashCode.Include
    private String code;

    private Map<String, ?> accessToken;

    private Map<String, ?> refreshToken;

    private String idToken;

    @JsonIgnore
    public AuthorizationCode toAuthorizationCode() {
        return code != null ? new AuthorizationCode(this.code) : null;
    }

    @JsonIgnore
    public AccessToken toAccessToken() {
        try {
            return accessToken != null ? AccessToken.parse(new JSONObject(accessToken)) : null;
        } catch (final Exception e) {
            throw new IllegalArgumentException(e);
        }
    }

    @JsonIgnore
    public RefreshToken toRefreshToken() {<FILL_FUNCTION_BODY>}

    @JsonIgnore
    public JWT toIdToken() {
        try {
            return idToken != null ? JWTParser.parse(this.idToken) : null;
        } catch (final Exception e) {
            throw new IllegalArgumentException(e);
        }
    }

    @JsonIgnore
    public void setAccessTokenObject(final AccessToken accessToken) {
        setAccessToken(accessToken.toJSONObject());
    }

    @JsonIgnore
    public void setRefreshTokenObject(final RefreshToken refreshToken) {
        setRefreshToken(refreshToken.toJSONObject());
    }
}

        try {
            return refreshToken != null ? RefreshToken.parse(new JSONObject(refreshToken)) : null;
        } catch (final Exception e) {
            throw new IllegalArgumentException(e);
        }
    
<methods>public non-sealed void <init>() ,public boolean isForAuthentication() <variables>protected org.pac4j.core.logout.LogoutType logoutType,private static final long serialVersionUID,protected java.lang.String source,private org.pac4j.core.profile.UserProfile userProfile