LivenessSessionConfig.fromSession constructor
LivenessSessionConfig.fromSession(
- LivenessSession session, {
- String region = 'eu-west-1',
Implementation
factory LivenessSessionConfig.fromSession(LivenessSession session, {String region = 'eu-west-1'}) {
return LivenessSessionConfig(
sessionId: session.sessionId,
accessKeyId: session.credentials.id, // Use .id instead of .accessKeyId
secretAccessKey: session.credentials.accessKey, // Use .accessKey instead of .secretAccessKey
sessionToken: session.credentials.token, // Use .token instead of .sessionToken
region: region, // Pass region as parameter since LivenessSession doesn't have it
);
}