getTokenWithHttpInfo method
Request a new temporary token for authentication
Note: This method returns the HTTP Response
.
Parameters:
Implementation
Future<Response> getTokenWithHttpInfo(String userId, String key, { int? tokenValidity, }) async {
// ignore: prefer_const_declarations
final path = r'/rest/v1/user/token/{userId}/{key}'.replaceAll('{userId}', userId).replaceAll('{key}', key);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (tokenValidity != null) {
queryParams.addAll(_queryParams('', 'tokenValidity', tokenValidity));
}
const authNames = <String>[r'basicSchema'];
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
authNames,
);
}