Custom Session IDs: Difference between revisions

From Resonite Wiki
Improve config example
Keep capitalisation consistent on ID
Line 1: Line 1:
Custom Session Ids are a custom format for regular [[Session IDs]], that can be easier to remember and work with.
Custom Session IDs are a custom format for regular [[Session IDs]], that can be easier to remember and work with.


== Benefits ==
== Benefits ==
Custom Session Ids are
Custom Session IDs are
* Static
* Static
** Unlike regular session ids which have randomized elements, custom session ids are static. This lets you use them in other configuration items without needing to update them each time the session re-starts.
** Unlike regular session IDs which have randomized elements, custom session IDs are static. This lets you use them in other configuration items without needing to update them each time the session restarts.
* Automatic
* Automatic
** When used with the <code>ressession://</code> url format, things like IP Addresses and ports are automatically resolved.
** When used with the <code>ressession://</code> url format, things like IP Addresses and ports are automatically resolved.


== Format ==
== Format ==
Custom Session Ids, have 3 Components.
Custom Session IDs, have 3 Components.


<code>S-<User Id or Group Id>:<custom text></code>
<code>S-<User ID or Group ID>:<custom text></code>


* The <code>S-</code> this is automatically added when '''setting''' a custom session id, but must be supplied when using a custom session id.
* The <code>S-</code> this is automatically added when '''setting''' a custom session ID, but must be supplied when using a custom session ID.
* A user id or group ID
* A user ID or group ID
** E.g. <code>U-ProbablePrime</code> for a User ID
** E.g. <code>U-ProbablePrime</code> for a User ID
** E.g. <code>G-Cheese</code> for a Group ID
** E.g. <code>G-Cheese</code> for a Group ID
* The custom text portion can be anything you'd like, but there are some restrictions.
* The custom text portion can be anything you'd like, but there are some restrictions.
** Only Alphanumeric Characters, Dash(-) and Underscore(_) can be used.
** Only Alphanumeric Characters, Dashes (-) and Underscores (_) can be used.


Combining everything together a full custom session Id example would be: <code>S-U-ProbablePrime:CheeseLand</code>.
Combining everything together a full custom session ID example would be: <code>S-U-ProbablePrime:CheeseLand</code>.


== Setting a Custom Session Id ==
== Setting a Custom Session ID ==


=== In the Headless Server Software configuration ===
=== In the Headless Server Software configuration ===
Line 43: Line 43:
</syntaxhighlight>
</syntaxhighlight>


== Using a Custom Session Id ==
== Using a Custom Session ID ==
You can use a custom session id, anywhere that expects a session Id, examples include:
You can use a custom session ID, anywhere that expects a session ID, examples include:
* ProtoFlux
* ProtoFlux
** The [[ProtoFlux:Open World]] node.
** The [[ProtoFlux:Open World]] node.

Revision as of 06:27, 28 September 2024

Custom Session IDs are a custom format for regular Session IDs, that can be easier to remember and work with.

Benefits

Custom Session IDs are

  • Static
    • Unlike regular session IDs which have randomized elements, custom session IDs are static. This lets you use them in other configuration items without needing to update them each time the session restarts.
  • Automatic
    • When used with the ressession:// url format, things like IP Addresses and ports are automatically resolved.

Format

Custom Session IDs, have 3 Components.

S-<User ID or Group ID>:<custom text>

  • The S- this is automatically added when setting a custom session ID, but must be supplied when using a custom session ID.
  • A user ID or group ID
    • E.g. U-ProbablePrime for a User ID
    • E.g. G-Cheese for a Group ID
  • The custom text portion can be anything you'd like, but there are some restrictions.
    • Only Alphanumeric Characters, Dashes (-) and Underscores (_) can be used.

Combining everything together a full custom session ID example would be: S-U-ProbablePrime:CheeseLand.

Setting a Custom Session ID

In the Headless Server Software configuration

Remember to not include S- in this configuration file.

Within the Headless Server Software/Configuration_File startWorlds configuration. For example:

{
  "$schema": "https://raw.githubusercontent.com/Yellow-Dog-Man/JSONSchemas/main/schemas/HeadlessConfig.schema.json",
  ... some other properties
  "startWorlds": [
    {
      "isEnabled": true,
      "customSessionId": "U-ProbablePrime:CheeseLand",
	  ... some other world properties
    }
  ],
  ... even more properties
}

Using a Custom Session ID

You can use a custom session ID, anywhere that expects a session ID, examples include:

When using it with the above methods, you'll need to ensure that it is used within a valid session url, there are a number of options:

  1. Use an LNL URL
    • For Example lnl-nat://aba6f27b-c51c-49ba-ac03-0bcc96cd97cc/S-U-ProbablePrime:CheeseLand.
  2. Use a ressession url
    • For Example ressession:///S-U-ProbablePrime:CheeseLand