loginWithJWT

fun loginWithJWT(accountId: String, jwt: String, storage: JwtStorage): <Error class: unknown class><LoginWithJWTOutput>

Login using the Custom JWT authentication scheme described in our documentation.

Note: When using this method, you are responsible for refreshing the JWT token before or when it expires. If the token expires, the client will throw a LightsparkAuthenticationException on the next API call which requires valid authentication. Then you'll need to call this method again to get a new token.

Return

The output of the login operation, including the access token, expiration time, and wallet info.

Parameters

accountId

The account ID to login with. This is specific to your company's account.

jwt

The JWT to use for authentication of this user.

storage

A JwtStorage implementation that will store the new JWT token info.

Throws

if the login fails.