usos groups refactoring

This commit is contained in:
yetju000 2019-11-30 14:49:53 +01:00
parent a340f2e847
commit 6d3339b058
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,7 @@ public class AuthorizationService {
oauth_token_secret = tokens[1].replace("oauth_token_secret=", "");
TokenResponseDTO tokenResponseDTO = createUserAccountAndReturnHeaderToken(oauth_token, oauth_token_secret);
updateUserGroupsAndStudents(oauth_token, oauth_token_secret);
logOut(oauth_token, oauth_token_secret);
//logOut(oauth_token, oauth_token_secret);
return tokenResponseDTO;
}
return new TokenResponseDTO("authorization failed", null);
@ -82,6 +82,7 @@ public class AuthorizationService {
private void updateUserGroupsAndStudents(String oauth_token, String oauth_token_secret) throws UnsupportedEncodingException, InvalidKeyException, NoSuchAlgorithmException {
List<NameValuePair> queryParams = new ArrayList<>();
queryParams.add(new BasicNameValuePair("fields", "course_unit_id|group_number|class_type|class_type_id|course_id|course_name|course_lang_id"));
queryParams.add(new BasicNameValuePair("oauth_consumer_key", propertiesLoader.getKey()));
queryParams.add(new BasicNameValuePair("oauth_nonce", "" + (int) (Math.random() * 100000000)));
queryParams.add(new BasicNameValuePair("oauth_signature_method", "HMAC-SHA1"));