generateWampCRAChallenge function
Implementation
String generateWampCRAChallenge(int sessionID, String authID, String authRole, String provider) {
final nonce = generateNonce();
final data = {
"nonce": nonce,
"authprovider": provider,
"authid": authID,
"authrole": authRole,
"authmethod": "wampcra",
"session": sessionID,
"timestamp": utcNow(),
};
return json.encode(data);
}