forked from firka/student-legacy
implement nonce v2
This commit is contained in:
parent
7b9ec6de2e
commit
043b669737
@ -24,8 +24,8 @@ import 'package:filcnaplo/api/nonce.dart';
|
||||
enum LoginState { missingFields, invalidGrant, failed, normal, inProgress, success }
|
||||
|
||||
Nonce getNonce(BuildContext context, String nonce, String username, String instituteCode) {
|
||||
Nonce nonceEncoder = Nonce(key: [53, 75, 109, 112, 109, 103, 100, 53, 102, 74], nonce: nonce);
|
||||
nonceEncoder.encode(username.toLowerCase() + instituteCode.toLowerCase() + nonce);
|
||||
Nonce nonceEncoder = Nonce(key: [98, 97, 83, 115, 120, 79, 119, 108, 85, 49, 106, 77], nonce: nonce);
|
||||
nonceEncoder.encode(instituteCode.toUpperCase() + nonce + username.toUpperCase());
|
||||
|
||||
return nonceEncoder;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class Nonce {
|
||||
return {
|
||||
"X-Authorizationpolicy-Nonce": nonce,
|
||||
"X-Authorizationpolicy-Key": encoded ?? "",
|
||||
"X-Authorizationpolicy-Version": "v1",
|
||||
"X-Authorizationpolicy-Version": "v2",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user