login
method handles the complete authentication flow, from message creation to token retrieval.
setAuthorizationHeader
method was created for scenarios where you already have a JWT token and need to set it on the Otim client for subsequent authenticated API calls, but don’t have the context to provide it during client creation.
The setAuthorizationHeader
method sets a JWT token on an existing Otim Client instance.
setAuthorizationHeader
because you can provide the token directly during client creation:
setAuthorizationHeader
callslogout
method handles the complete logout process: it calls the Otim API to invalidate the session server-side and clears the local authentication state from the client. This ensures proper cleanup of both client and server authentication state.