class SessionIdUserTokenGenerator implements UserTokenGenerator, Serializable {

    private static final long serialVersionUID = -9197243220777237431L;

    @Override
    public String getSupportTokenType() {
        return TOKEN_TYPE_SESSION_ID;
    }

    @Override
    public GeneratedToken generate(Authentication authentication) {<FILL_FUNCTION_BODY>}
}

        HttpServletRequest request = WebUtils.getHttpServletRequest();
        if (null == request) {
            throw new UnsupportedOperationException();
        }

        int timeout = request.getSession().getMaxInactiveInterval() * 1000;

        String sessionId = request.getSession().getId();

        return new GeneratedToken() {
            private static final long serialVersionUID = 3964183451883410929L;

            @Override
            public Map<String, Object> getResponse() {
                return new java.util.HashMap<>();
            }

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

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

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