odin_token_generator_create_token_ex
Generates a signed JWT such as odin_token_generator_create_token
and allows passing a custom set of OdinTokenOptions
for advanced use-cases. This function will only be needed if you want to connect to
an on-premise hosted server without using a gateway.
This function should not be used in production as the access key will be exposed in the client application. You can use our simple server side token server to generate tokens for your clients. See our guides on access keys and tokens for more information.
Parameters
generator
Handle of the token generator used to create the token. See OdinTokenGenerator
room_id
ID of the room for which the token will be generated. It can be any null-terminated string.
user_id
ID of the user for which the token will be generated. It can be any null-terminated string.
It should not contain personal data (in the definition of GDPR) like an email address. Use a unique identifier for the user. This should be a Steam ID, Discord ID, or any other unique identifier from your authentication system.
out_token
Pointer to a buffer where the generated token will be stored.
out_token_len
Size of the buffer for the token.
options
Pointer to the options used to configure the token generation. See OdinTokenOptions
Returns
A return code indicating success or failure.