createSessionTokenFromTemplateWithHttpInfo method
Future<Response>
createSessionTokenFromTemplateWithHttpInfo(
- String sessionId,
- String templateName, {
- CreateSessionTokenFromTemplateRequest? createSessionTokenFromTemplateRequest,
Create a session token from a jwt template
Creates a JSON Web Token(JWT) based on a session and a JWT Template name defined for your instance
Note: This method returns the HTTP Response
.
Parameters:
-
String sessionId (required): The ID of the session
-
String templateName (required): The name of the JWT Template defined in your instance (e.g.
custom_hasura
). -
CreateSessionTokenFromTemplateRequest createSessionTokenFromTemplateRequest:
Implementation
Future<http.Response> createSessionTokenFromTemplateWithHttpInfo(
String sessionId,
String templateName, {
CreateSessionTokenFromTemplateRequest?
createSessionTokenFromTemplateRequest,
}) async {
// ignore: prefer_const_declarations
final path = r'/sessions/{session_id}/tokens/{template_name}'
.replaceAll('{session_id}', sessionId)
.replaceAll('{template_name}', templateName);
// ignore: prefer_final_locals
Object? postBody = createSessionTokenFromTemplateRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}