title: Getting session uuid set in redis
body: <p>I am setting a session attribute whenever a user is logged in like this <code>request.getSession().setAttribute(sessionUuid, user);</code>. <code>sessionUuid</code> is uuid which I am setting. But seems like this <code>sessionUuid</code> is not the session id, redis generates a session id by itself. Which looks like something like this</p>
  <pre><code>1) &quot;spring:session:expirations:1597563240000&quot;
  2) &quot;spring:session:sessions:expires:9dfef52d-d94a-4bcf-a08e-4a362b36f332&quot;
  3) &quot;spring:session:sessions:9dfef52d-d94a-4bcf-a08e-4a362b36f332&quot;
  </code></pre>
  <p>From my understanding the session uuid is <code>9dfef52d-d94a-4bcf-a08e-4a362b36f332</code>, for the attribute I have set.</p>
  <p>What I am trying to understand is since redis generates a session id by itslef, then how am I supposed to get the redis session id, so that next time whenever user makes a request I can validate if the session is active or not ?</p>
  <pre><code>if(request.getSession().getAttribute(&quot;9dfef52d-d94a-4bcf-a08e-4a362b36f332&quot;) != null) {
      return (UserSessionComponent) request.getSession().getAttribute(session);
  }
  </code></pre>
  <p>Or does the redis search all the session for that particular attribute ?</p>