oauth - How to add google OAuth2.0 support in my CAS server -
I am using jasig cas4.0 server. I have implemented Facebook Oath 2.0 support in my cas server and it works correctly. Now, I want to add Google oAuth support (Google2Client) to the same CAS-server.
1) I have created a new project in the console. Developers Has created a new client ID under OA
2) I have made it my applicationcontext.xml
& lt; Been id = "google1" class = "org" has been added. .pac4j.oauth.client.Google2Client "> gt; & lt; property name =" key "value =" & lt; & Lt; CLIENT_ID & gt; & Gt; "/ & gt; & lt; Property Name =" Incognito "value =" & lt; Property name = "field" value = "id, name, first_name, middle_name, last_name, gender, email" CLIENT_SECRET "/> property name =" scope "value =" email "/> & lt; />
I have also registered this bean in the customer
& lt; bean id = "Client" category = "org.pac4j.core.client.Clients"> gt; property name = "callback url" value = "https://rajan.com:1443/cas/login" /> ; & Lt; Property Name = "Client">
& lt; ref bean = "google1" /> & gt; & lt; / List & gt; & lt; / Sampat 3) And finally, I call it Casojogwiz.jsp & lt; a href = "$ {FacebookClientUrl}" & gt; & gt; & lt; / sem & gt; Certified with Facebook & lt; / a & gt; & lt; br / & gt; Authenticate with Google & lt; / a & gt; & lt; a href = "$ {Google2ClientUrl}" & gt; ;
However, when I open the Cas Login view in the browser, the Google link for "Google" instead of the Google Oauth url contains "Facebook Link Works" is.
Can anyone help me forget what I'm missing Thanks.
I did not have any field property checked in Google2OauthClient.
Therefore, the work done by removing the property of the farm in the above bean. I've changed the field email with EMAIL_AND_PROFILE
Comments
Post a Comment