<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: burhanuddin taha</title>
    <description>The latest articles on DEV Community by burhanuddin taha (@burhantaha).</description>
    <link>https://dev.to/burhantaha</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F258127%2Fb9c76176-08bd-4ff5-bb16-1f5393014107.jpg</url>
      <title>DEV Community: burhanuddin taha</title>
      <link>https://dev.to/burhantaha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/burhantaha"/>
    <language>en</language>
    <item>
      <title>Running Kubernetes on MacBook, without minikube</title>
      <dc:creator>burhanuddin taha</dc:creator>
      <pubDate>Sat, 12 Sep 2020 17:23:20 +0000</pubDate>
      <link>https://dev.to/burhantaha/running-kubernetes-on-macbook-without-minikube-l6e</link>
      <guid>https://dev.to/burhantaha/running-kubernetes-on-macbook-without-minikube-l6e</guid>
      <description>&lt;h1&gt;
  
  
  Docker on Mac with Kubernetes
&lt;/h1&gt;

&lt;p&gt;Docker on mac version 2.3.0.4 is come with default support of kubernetes. Kubernetes support with docker on mac is available since 18.06 stable or higher, but by default kubernetes is not enable, you have to enable it which we will see how to do it&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KHhm1u9s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/78ovn2kg6fz65n6e356i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KHhm1u9s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/78ovn2kg6fz65n6e356i.png" alt="Screenshot 2020-09-12 at 22.49.10"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is very easy to enable kubernetes. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to Preferences of Docker on Mac&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iWfSvFV1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hh7e8xt35mxran4n6yve.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iWfSvFV1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hh7e8xt35mxran4n6yve.png" alt="Screenshot 2020-09-12 at 22.54.58"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select kubernetes and click on enable kubernetes checkbox. finally restart and observe Kubernetes status. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--21zAWUKr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/127qf2k3ehqezxresg33.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--21zAWUKr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/127qf2k3ehqezxresg33.png" alt="Screenshot 2020-09-12 at 22.56.15"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you are lucky enough kubernetes satus might get turn from starting to running state. But don't worry if kubernetes is not getting started perform following action. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;go to terminal and run following command&lt;br&gt;
&lt;code&gt;rm -rf ~/Library/Group\ Containers/group.com.docker/pki/&lt;/code&gt;&lt;br&gt;
&lt;code&gt;rm -rf ~/.kube&lt;/code&gt;&lt;br&gt;
finally &lt;br&gt;
restart Docker for Mac:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;after restart give 5 mins for kubernete to start and you will see following &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wk99-eu1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2tmhkhek467t46czpqf6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wk99-eu1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2tmhkhek467t46czpqf6.png" alt="Screenshot 2020-09-12 at 23.04.04"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>beginners</category>
      <category>macbook</category>
    </item>
    <item>
      <title>AWS running Docker on EC2 and use Elastic Load balancer. </title>
      <dc:creator>burhanuddin taha</dc:creator>
      <pubDate>Tue, 19 May 2020 11:04:13 +0000</pubDate>
      <link>https://dev.to/burhantaha/aws-running-docker-on-ec2-and-use-elastic-load-balancer-2039</link>
      <guid>https://dev.to/burhantaha/aws-running-docker-on-ec2-and-use-elastic-load-balancer-2039</guid>
      <description>&lt;p&gt;Running the docker service and docker image on EC2 instance is very simple in this brief write up i will try to cover how we can setup docker engine and then run application on the docker and then expose using Application load balancer&lt;/p&gt;

&lt;p&gt;I have use EC2 instance with Ubuntu 18.04, one can find this in the catalog under free tier&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nXSAW8Mk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/c2y5pnouh5gckr5tiblf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nXSAW8Mk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/c2y5pnouh5gckr5tiblf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;once the instance is up and running and you are connected with the instance. (follow following &lt;a href="https://docs.aws.amazon.com/quickstarts/latest/vmlaunch/step-2-connect-to-instance.html"&gt;tutorial &lt;/a&gt; to connect EC2 instance form your machine.)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Make sure you have root access or IAMROLE to install using root user&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Firstly, we're going to install Docker and Docker Compose packages to the Ubuntu system. And we will be using Docker packages from the Official Ubuntu repository. The first step is to add the GPG key for the official Docker repository using :&lt;br&gt;
&lt;code&gt;&lt;br&gt;
curl -fsSL &lt;a href="https://download.docker.com/linux/ubuntu/gpg"&gt;https://download.docker.com/linux/ubuntu/gpg&lt;/a&gt; | sudo apt-key add -&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adding Docker repository to APT sources is next we have to do:&lt;br&gt;
&lt;code&gt;sudo add-apt-repository "deb [arch=amd64] &lt;a href="https://download.docker.com/linux/ubuntu"&gt;https://download.docker.com/linux/ubuntu&lt;/a&gt; $(lsb_release -cs) stable"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next, we have to update the package database usual ubuntu command:&lt;br&gt;
&lt;code&gt;sudo apt-get update&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally, we are ready to install docker on system&lt;br&gt;
&lt;code&gt;sudo apt-get install -y docker-ce&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;lets check if docker installed and give correct version&lt;br&gt;
&lt;code&gt;docker --version&lt;/code&gt;&lt;br&gt;
when we run this command on EC2 instance of AWS we usually get error and required sudo to run command. &lt;br&gt;
&lt;em&gt;to avoid this we have to add our user in the group name as docker which is available by default on the AWS&lt;/em&gt;&lt;br&gt;
&lt;code&gt;sudo usermod -aG docker ${USER}&lt;/code&gt;&lt;br&gt;
now exit the shell and close the terminal, and re-connect to the EC2 instance &lt;br&gt;
Now try to run &lt;br&gt;
&lt;code&gt;docker version&lt;/code&gt;&lt;br&gt;
you will see something like this &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3qderaVI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pezbztm7pzh39nmbtjbe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3qderaVI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pezbztm7pzh39nmbtjbe.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Lets install docker compose which is use for orchestrating docker services &lt;br&gt;
&lt;code&gt; sudo apt install docker-compose -y &lt;/code&gt;&lt;br&gt;
&lt;code&gt; docker-compose version &lt;/code&gt;&lt;br&gt;
which should return something like below&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kR3udCo6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dqauqv7oprx1liv7kzk8.png" alt="Alt Text"&gt;
&lt;/h2&gt;

&lt;p&gt;Thats it now we are ready to run docker on EC2 instance, lets create one image and run the image&lt;br&gt;
&lt;code&gt; docker run hello-world &lt;/code&gt;&lt;br&gt;
if all is setup properly we can see following on console. &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u6azTG78--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ox4ub84fz0ep16hf3ijf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u6azTG78--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ox4ub84fz0ep16hf3ijf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hurray!!! all is done. &lt;/p&gt;

&lt;p&gt;Now to expose our service using Elastic load balancer, &lt;/p&gt;

&lt;p&gt;what i have done i have run Laravel application on Docker on EC2. &lt;br&gt;
running Laravel application using docker is not in the scope on this writeup but i will cover in dedicated blog.&lt;br&gt;
so i have following  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Laveravel php application &lt;/li&gt;
&lt;li&gt;Ngnix running on docker and contain Laravel appliaction as root.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;when all services are up and running on EC2 instance.something like this for me as i am running Nginx under docker. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZSoRzvA8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6xxwc6xsbzvnzrxtf9bp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZSoRzvA8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6xxwc6xsbzvnzrxtf9bp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lets move the expose the docker service running on EC2 using Elastic Loadbalancer. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create target group, target group is use to route the traffic from loadbalancer to EC2 instance based on rule define on loadbalancer level.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4rvDgQnY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dlq4u2m61k263f7rbc3q.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Click to Target Group&lt;/li&gt;
&lt;li&gt;Create new target group&lt;/li&gt;
&lt;li&gt;Select target &lt;/li&gt;
&lt;li&gt;Edit and add EC2 instance in this target group on port 80&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;what it says is that "in this target group there is one EC2 instance which is listening to port 80 to serve any request". &lt;br&gt;
Now if you see above as said i have nginx see i have port 80 on which nginx server is listening with php application. &lt;/p&gt;

&lt;p&gt;Now we need loadbalancer which will help to route external traffic to our instance. &lt;/p&gt;

&lt;p&gt;AWS provide two different flavour of loadbalancer &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Application load balancer (which we will use)&lt;/li&gt;
&lt;li&gt;Network load balancer (use when you need to control traffic, need static ip for your application or want very high performance) &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To enable loadbalancer &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;click on loadbalancer on EC2 console something like this
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VeL-ufDb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bnf5cwub6x4j699jmub7.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;create loadbalancer
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EQHw_lPG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/i4uq9b38zpbxavpaq0uo.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Now give the name of your load balancer and finally main part is to add listener.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CqUEHkv2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vlc4o8whb3uin7eq6fy4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CqUEHkv2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vlc4o8whb3uin7eq6fy4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chose protocol http/https&lt;/li&gt;
&lt;li&gt;Chose port on which load balancer will listen&lt;/li&gt;
&lt;li&gt;And finally define rule like forward request to already created target group (as we did above)&lt;/li&gt;
&lt;li&gt;Finally the main part, either create or choose the security group which has inbound rule where above port is open for all incoming traffic. something like this
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZgPR-AVs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6z4pksv1x1gynlui8dlz.png" alt="Alt Text"&gt;
if this is not present then you will not able to access load balancer url from outside as from outside ports couldn't be reachable. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thats it, now copy the dns name or public ip of your loadbalancer and try to access using browser, you will see application index page loaded which is running in docker on EC2 instance. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Spring Social Login</title>
      <dc:creator>burhanuddin taha</dc:creator>
      <pubDate>Fri, 20 Mar 2020 05:08:58 +0000</pubDate>
      <link>https://dev.to/burhantaha/spring-social-login-3bi3</link>
      <guid>https://dev.to/burhantaha/spring-social-login-3bi3</guid>
      <description>&lt;p&gt;In my last &lt;a href="https://dev.to/burhantaha/spring-boot-social-and-dependencies-overview-36f9"&gt;post&lt;/a&gt; i tried to cover different ways by which one can integrate with social login in application, we started with dependencies selection and in this post we will try to understand how implementation is differ with each other, based on usecase we can select the way of implementation which starts with dependencies. &lt;/p&gt;

&lt;p&gt;As we all know that integration with any authorization server (here in our case any social service provider like google) is based on OAUTH2, which deals with authentication (openid) and authorization (scope/grants). In our case we ask user to perform login on any social site and once login is successful, we will allow user to perform action on our application.&lt;/p&gt;

&lt;p&gt;Using spring we can achieve above use case by different ways. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Using Oauth2Client provided by Spring Security&lt;/li&gt;
&lt;li&gt;Using SpringSocial provided by Spring&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There is major change from Spring Security 4.X to Spring Security 5.x, this is worth to mention because spring boot 1.5.x to spring boot 2.1.x uses spring security with different version. &lt;/p&gt;

&lt;p&gt;May be this table will help to understand&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tr&gt;
&lt;th&gt; Spring Boot 1.5.x with spring security 4.2.x&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Using Spring OAuth Client&lt;br&gt;
Spring boot security starter provides default spring security 4.x dependencies, and Spring 4.x doesn't have by default support available for oauth2, to work with oauth2, it is required to include additional dependency for Spring-Security-oauth2 &lt;br&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_gm1kdQd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hh0ejvi8gmuer1ayy7gi.png"&gt;
&lt;li&gt;Using @enableOAuthSSO&lt;/li&gt;
Spring security oauth2 provides an special annotation named @enableOAuthSSO,using it one can enable Social Login without much effort, only need is to add the basic oauth configuration  in yaml file.

@enableOAuthSSO enables special filter called "Oauth2clientauthenticationprocessingfilter" which bridges gap between spring security and Oauth2 flow. 
&lt;ol&gt;
This filter perform mainly two task
&lt;li&gt;Enable oauth2client for OAuth flow&lt;/li&gt;
&lt;li&gt;After successful oauth flow, align springsecuritycontext.&lt;/li&gt;
&lt;/ol&gt;

But @enableOAuthSSO can only support single provider, means if you want to support more then one social login like google and facebook in same project, @enableOAuthSSO won't help

&lt;li&gt;Using Oauth2client&lt;/li&gt;

If we want to integrate more then one social for the authentication purpose, then we have to do some extra things, 
&lt;ol&gt;
&lt;li&gt;Use @EnableOAuth2Client&lt;/li&gt;
&lt;li&gt;Write a custom filter class which will handle OAuth2ClientContext&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;

&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt; Spring Boot 2.1.x with spring security 5.1.x&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
With Spring Security 5.1.x Oauth2 authentication is by default first class citizen, it is very simple for an application to act as Oauth2 client, 
As we seen with older version of Spring Security there is specific annotation called "EnableOAuthSSO" which enable under the hood oauth2client and OAuth2SecurityFilter, in latest version of spring security this annotation is removed, instead if you include the dependency of oauth2 client with spring security and provide the client configuration in the configuration (application.yml) spring by default enable oauth2 login 
&lt;br&gt;
With spring boot &lt;br&gt;
if we include, &lt;br&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5sCjLTFJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6y3usznxcvluggvzbn4b.png"&gt;
&lt;br&gt;
And add following configuration in the application.yaml
spring:&lt;br&gt;
   security:&lt;br&gt;
  oauth2:&lt;br&gt;
   client:&lt;br&gt;
    registration:&lt;br&gt;
     google:&lt;br&gt;
      client-id: XX&lt;br&gt;
      client-secret: XX&lt;br&gt;

Run the application and as soon as we will open the home page, it will by default navigate to the google, if there are more then one oauth2 client configure then spring will give the option to choose by providing the list.
&lt;br&gt;
Spring provide default provider page, base on the configuration define in the application.yaml 

&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;Using Spring Social&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The Spring Social project provides:
&lt;ol&gt;
&lt;li&gt;A standard way to get access to the social network specific API’s with Java bindings to popular service provider APIs such as Facebook, Twitter, LinkedIn and GitHub.&lt;/li&gt;
&lt;li&gt;An extensible service provider framework that greatly simplifies the process of connecting local user accounts to social network provider accounts.&lt;/li&gt;
&lt;/ol&gt;
Following are the step to provide login using social networking site like facebook and twitter, 
&lt;ul&gt;
&lt;li&gt; Define Social Configuration by providing userconnectionrepository (by default spring use in-memory implementation but there is also JDBC implementation provided by spring social.) &lt;/li&gt;
&lt;li&gt; Provide implementation for SignInAdaptor, this Adaptor is one hook point which Spring Social provide to take action as well as align the Spring security after successful Oath2 flow. (SingInAdaptor will be called only if UserConnectionisAlreadyExist)&lt;/li&gt;
&lt;li&gt; if user is not found in the UserConnectionRepository, then spring redirect to singup page (a url which is provided during defining  ProviderSignInController). &lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In nutshell it is very easy with new spring security to provide login with any external authentication provider, by default spring provide implementation for most of the known social networking site. &lt;/p&gt;

&lt;p&gt;In future article i will try to cover more on the implementation part as well as custom authorization server and authentication using it. &lt;/p&gt;

</description>
      <category>spring</category>
      <category>springsocial</category>
      <category>springboot</category>
      <category>java</category>
    </item>
    <item>
      <title>Spring boot social and dependencies overview</title>
      <dc:creator>burhanuddin taha</dc:creator>
      <pubDate>Fri, 25 Oct 2019 22:57:55 +0000</pubDate>
      <link>https://dev.to/burhantaha/spring-boot-social-and-dependencies-overview-36f9</link>
      <guid>https://dev.to/burhantaha/spring-boot-social-and-dependencies-overview-36f9</guid>
      <description>&lt;p&gt;This post is based on my latest experience, where i was just wanted to integrate Social login within my application. After spring boot it seems it is easy piece of cake, Yes i was developing an application and services using springboot, and here my struggle start.&lt;br&gt;
Problem is spring do lot of thing behind the scene which some time make difficult to understand as we are developer we need all the control at-least we deserve to know whats going on (scherzosa). &lt;/p&gt;

&lt;p&gt;First thing needed is the dependencies and here world of spring starter starts and dilemma of how to choose, This post mainly focus on the Spring starter dependencies and when to choose which one. &lt;/p&gt;

&lt;p&gt;When i started to search how to integrate with social login i came across to following options. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use Spring Oauth2 client&lt;/li&gt;
&lt;li&gt;Use Spring Social. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now to go with the first option Spring provides two starter which comes with two different flavour&lt;/p&gt;

&lt;p&gt;A. If you are using Spring boot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fj6lmdta9zlra0fn3j7oo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fj6lmdta9zlra0fn3j7oo.png" alt="springbootway"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0e5gz0w4b831hj67m71l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0e5gz0w4b831hj67m71l.png" alt="springbootway"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;B. If you are using only spring security in your project&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fb9kg1tm18y2bl149jaua.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fb9kg1tm18y2bl149jaua.png" alt="springsecurityonly"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff02dtnxd33wpfwwjsow1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff02dtnxd33wpfwwjsow1.png" alt="springsecurityonlydependency"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But some time we have a case where we don't need security from spring or we need only social login without security definition or any security context. Spring provide solution for such cases where we can choose spring social integration with specific provider like facebook, linkedin etc. &lt;br&gt;
Here are the dependencies use for such cases. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F93bshesmc43q3dy077n5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F93bshesmc43q3dy077n5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically spring has different stream of projects, they usually combine some in specific starter like mostly spring boot starter and some specific stream starter like security. But one can always choose independent stream like Social case by case need. &lt;/p&gt;

&lt;p&gt;After sorting out which dependencies should be needed we have to do real stuff, each dependencies come with some specific set of functionality. In later post i will try to cover the difference in the implementation. &lt;/p&gt;

</description>
      <category>java</category>
      <category>spring</category>
      <category>springsocial</category>
      <category>sociallogin</category>
    </item>
  </channel>
</rss>
