usos groups refactoring
This commit is contained in:
parent
a340f2e847
commit
6d3339b058
@ -74,7 +74,7 @@ public class AuthorizationService {
|
|||||||
oauth_token_secret = tokens[1].replace("oauth_token_secret=", "");
|
oauth_token_secret = tokens[1].replace("oauth_token_secret=", "");
|
||||||
TokenResponseDTO tokenResponseDTO = createUserAccountAndReturnHeaderToken(oauth_token, oauth_token_secret);
|
TokenResponseDTO tokenResponseDTO = createUserAccountAndReturnHeaderToken(oauth_token, oauth_token_secret);
|
||||||
updateUserGroupsAndStudents(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 tokenResponseDTO;
|
||||||
}
|
}
|
||||||
return new TokenResponseDTO("authorization failed", null);
|
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 {
|
private void updateUserGroupsAndStudents(String oauth_token, String oauth_token_secret) throws UnsupportedEncodingException, InvalidKeyException, NoSuchAlgorithmException {
|
||||||
List<NameValuePair> queryParams = new ArrayList<>();
|
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_consumer_key", propertiesLoader.getKey()));
|
||||||
queryParams.add(new BasicNameValuePair("oauth_nonce", "" + (int) (Math.random() * 100000000)));
|
queryParams.add(new BasicNameValuePair("oauth_nonce", "" + (int) (Math.random() * 100000000)));
|
||||||
queryParams.add(new BasicNameValuePair("oauth_signature_method", "HMAC-SHA1"));
|
queryParams.add(new BasicNameValuePair("oauth_signature_method", "HMAC-SHA1"));
|
||||||
|
Loading…
Reference in New Issue
Block a user