How to specify Open ID Realm in spring security?

We use Spring Security in our application with authentication support based on username and password, as well as authentication based on Open id.

The problem is that google provides a different public identifier for the specified return URL, and we have at least 2 different entry points in our application, of which an open identifier is configured in our system.

Therefore, we decided to use the id id scope.

http://blog.stackoverflow.com/2009/0...ue-per-domain/

http://groups.google.com/group/googl...unts-api?pli=1

How can I integrate a scope into our Spring configuration / code? So we do this in the traditional openid library code:

AuthRequest authReq = consumerManager.authenticate (found, someReturnToUrl, " http://www.example.com ");

This works and gives the same public identifier for different URLs from our site.

our configuration:

the code:

... <http auto-config="false"> <!-- <intercept-url> tags are here --> <remember-me user-service-ref="someRememberedService" key="some key" /> <form-login login-page="/Login.html" authentication-failure-url="/Login.html?error=true" always-use-default-target="false" default-target-url="/MainPage.html"/> <openid-login authentication-failure-url="/Login.html?error=true" always-use-default-target="true" default-target-url="/MainPage.html" user-service-ref="someOpenIdUserService"/> </http> ... <beans:bean id="openIdAuthenticationProvider" class="org.springframework.security.providers.openid.OpenIDAuthenticationProvider"> <custom-authentication-provider /> <beans:property name="userDetailsService" ref="openIdUserService"/> </beans:bean> <beans:bean id="openIdUserService" class="some.package.OpenIDUserDetailsService"> </beans:bean> ... 
+4
source share
1 answer

This question is really old, ashamed to let him die without a single answer. There are several guides, mainly for SS version 3:

Tutorial 1: Spring Security 3 - OpenID Login with Google Provider

Tutorial 2: Exploring Google Login and OpenID with Spring Security and Spring Roo

0
source

Source: https://habr.com/ru/post/1306223/


All Articles