GSoC 17 With Drupal : Week 2

Submitted by hudixt on Wed, 06/14/2017 - 00:33
GSOC 2017  : Coding Period

I am working on Adding support for The league oauth and new implementers for social auth and social post under the mentorship of Getulio Sánchez "gvso" (Paraguay) and Daniel Harris “dahacouk” (UK).

In the last week, we created Entities for the Social auth and Social Post which will be used by the social auth and social post implementers. This week, we’ll start utilizing the entities we created.

Here are some of the things that I worked on during the 2nd week of GSoC coding period.

Defining OAuth2Manager Class And Interface in social_api [Pull Request]

As we’ll be integrating the league in both social post and social auth implementers, we will create a common class and interface for both social auth and social post. The OAuth2Manager serves as a base class and contains common methods which will be further extended by Social Auth and Social Post modules.

Create PostManager Class and Interface in social_post [Pull Request]

We have defined OAuth2Manager in social_api, thus we need to create a common interface and class for underlying social post implementers. This will contain common methods that will be used in social_post implementers.

Modifying OAuth2Manager Class And Interface in social_auth [Pull Request]

As we have already defined OAuth2Manager in social_api, thus we need to only extend it in social_auth. As the name of the class in both social auth and social api is same, we defined an alias for them to extend the class. The OAuth2Manager currently contains methods getUserInfo method which will be used by social_auth implementers.

Modifying SocialAuthUserManager.php to utilize social_auth entities -

As we’ll be shifting from using email to identify users, it has become essential to utilize entities. I have added two methods in SocialAuthUserManager.php, addUserRecord adds a user to the entity and checkIfUserExists check if the record exists with social_network_id and social_network_name and return Drupal user id.

I have also started using GitKraken to manage my git repositories, as my project involves working on various repositories it started becoming difficult for me to manage multiple repos. Gitkraken is GIT GUI software which offers visual branch, in app-merge conflict editor and one-click undo. Gitkaren Pro is available to the student for free.

Gitkraken

 

These were some of the important tasks related to my project that I had to work on during my second week. I was thrilled by the second week of Google Summer Of Code coding phase, my goal for the next week is to finish SocialAuthUserManager to use Entity in the authentication process, create methods in SocialPostManager.php to utilize social_post entity to store user_related data and get started with reordering on implementers in social_auth.

 

Tags