'Authenticate user via the provided credentials and return the corresponding API client.'

def get_api_client(self):

    unauthenticated_client = libbrook.ApiClient(host=self._API_ENDPOINT)
    auth_api = libbrook.AuthApi(unauthenticated_client)
    api_token = libbrook.AuthTokenRequest()
    api_token.token = self.api_token
    jwt = auth_api.auth_token(token=api_token)
    return libbrook.ApiClient(host=self._API_ENDPOINT, header_name='Authorization', header_value=('Bearer    %s' % jwt.token))
