WSG How to obtain an auth token?

Quote from the doc:
"For Bentley Web Services Gateway running in the Bentley CONNECT environment, all requests must have a Token header."

What is the auth endpoint and request details to obtain a valid token for an existing IMS user?

Can someone give an example. Curl or other way to communicate the usage.

Thank you