title: Vapor - Create a room session with ID
body: <p>I'm working on a Vapor backend and I'm looking to create sessions for single entry. The client should ask to create the session and the backend will return a session ID that the client can use.<br />
  This is the outline:</p>
  <pre><code>// routes.swift
  
  func routes(_ app: App) throws {
      app.post(&quot;create_room&quot;) { req -&gt; BaseResponse&lt;CreateRoomResponse&gt; in
          let roomName = try req.content.decode(CreateRoomRequest.self).name
          let roomId = &quot;ABCD&quot;
          
          // Create a session, store credentials...
          ...
  
          return CreateRoomResponse(status: .ok, payload: roomId)
      }
  }
  </code></pre>
  <p>Now, I'm trying to figure out where to store the session data and ID for later use, and potentially destruction after <code>x</code> amount of time.<br />
  I've read in the Vapor documentation about both Authorization and Sessions but couldn't quite found something that fits my needs, or at least not in a way I can intuitively implement as my experience with backend programming is not great.<br />
  How would I go about to implement a session like this? Where do I store the credentials and how do I access them later down the way?<br />
  Thanks a lot in advance!</p>