retrieveUserUsingJWT method

Future<ClientResponse<UserResponse, Errors>> retrieveUserUsingJWT(
  1. String encodedJWT
)

Retrieves the user for the given Id. This method does not use an API key, instead it uses a JSON Web Token (JWT) for authentication.

@param {String} encodedJWT The encoded JWT (access token). @returns {Promise<ClientResponse

Implementation

Future<ClientResponse<UserResponse, Errors>> retrieveUserUsingJWT(
    String encodedJWT) {
  return _startAnonymous<UserResponse, Errors>()
      .withUri('/api/user')
      .withAuthorization('Bearer ' + encodedJWT)
      .withMethod('GET')
      .withResponseHandler(
          defaultResponseHandlerBuilder((d) => UserResponse.fromJson(d)))
      .go();
}