Deprecate OpenID 2.0 support
Deprecate OpenID 2.0 support
This commit is contained in:
@@ -20,6 +20,9 @@ import org.springframework.security.web.context.AbstractSecurityWebApplicationIn
|
||||
/**
|
||||
* No customizations of {@link AbstractSecurityWebApplicationInitializer} are necessary.
|
||||
*
|
||||
* @deprecated The OpenID 1.0 and 2.0 protocols have been deprecated and users are
|
||||
* <a href="https://openid.net/specs/openid-connect-migration-1_0.html">encouraged to migrate</a>
|
||||
* to <a href="https://openid.net/connect/">OpenID Connect</a>, which is supported by <code>spring-security-oauth2</code>.
|
||||
* @author Rob Winch
|
||||
*/
|
||||
public class MessageSecurityWebApplicationInitializer extends
|
||||
|
||||
@@ -20,6 +20,11 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.samples.security.CustomUserDetailsService;
|
||||
|
||||
/**
|
||||
* @deprecated The OpenID 1.0 and 2.0 protocols have been deprecated and users are
|
||||
* <a href="https://openid.net/specs/openid-connect-migration-1_0.html">encouraged to migrate</a>
|
||||
* to <a href="https://openid.net/connect/">OpenID Connect</a>, which is supported by <code>spring-security-oauth2</code>.
|
||||
*/
|
||||
@EnableWebSecurity
|
||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
// @formatter:off
|
||||
|
||||
@@ -21,6 +21,11 @@ import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
/**
|
||||
* @deprecated The OpenID 1.0 and 2.0 protocols have been deprecated and users are
|
||||
* <a href="https://openid.net/specs/openid-connect-migration-1_0.html">encouraged to migrate</a>
|
||||
* to <a href="https://openid.net/connect/">OpenID Connect</a>, which is supported by <code>spring-security-oauth2</code>.
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/user/")
|
||||
public class UserController {
|
||||
|
||||
@@ -22,6 +22,11 @@ import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.openid.OpenIDAuthenticationToken;
|
||||
|
||||
/**
|
||||
* @deprecated The OpenID 1.0 and 2.0 protocols have been deprecated and users are
|
||||
* <a href="https://openid.net/specs/openid-connect-migration-1_0.html">encouraged to migrate</a>
|
||||
* to <a href="https://openid.net/connect/">OpenID Connect</a>, which is supported by <code>spring-security-oauth2</code>.
|
||||
*/
|
||||
public class CustomUserDetailsService implements
|
||||
AuthenticationUserDetailsService<OpenIDAuthenticationToken> {
|
||||
public UserDetails loadUserDetails(OpenIDAuthenticationToken token)
|
||||
@@ -29,4 +34,4 @@ public class CustomUserDetailsService implements
|
||||
return new User(token.getName(), "",
|
||||
AuthorityUtils.createAuthorityList("ROLE_USER"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
<body th:include="layout :: body" th:with="content=~{::content}">
|
||||
<div th:fragment="content">
|
||||
<form name="f" th:action="@{/login/openid}" method="post" id="openid_form">
|
||||
<p><strong>
|
||||
NOTE: The OpenID 1.0 and 2.0 protocols have been deprecated and users are
|
||||
<a href="https://openid.net/specs/openid-connect-migration-1_0.html">encouraged to migrate</a>
|
||||
to <a href="https://openid.net/connect/">OpenID Connect</a>, which is supported by <code>spring-security-oauth2</code>.
|
||||
</strong></p>
|
||||
<input type="hidden" name="action" value="verify" />
|
||||
<fieldset>
|
||||
<legend>Sign-in or Create New Account</legend>
|
||||
@@ -43,4 +48,4 @@
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -23,6 +23,9 @@ import org.springframework.security.core.userdetails.User;
|
||||
/**
|
||||
* Customized {@code UserDetails} implementation.
|
||||
*
|
||||
* @deprecated The OpenID 1.0 and 2.0 protocols have been deprecated and users are
|
||||
* <a href="https://openid.net/specs/openid-connect-migration-1_0.html">encouraged to migrate</a>
|
||||
* to <a href="https://openid.net/connect/">OpenID Connect</a>, which is supported by <code>spring-security-oauth2</code>.
|
||||
* @author Luke Taylor
|
||||
* @since 3.1
|
||||
*/
|
||||
|
||||
@@ -32,6 +32,9 @@ import org.springframework.security.openid.OpenIDAuthenticationToken;
|
||||
* Custom UserDetailsService which accepts any OpenID user, "registering" new users in a
|
||||
* map so they can be welcomed back to the site on subsequent logins.
|
||||
*
|
||||
* @deprecated The OpenID 1.0 and 2.0 protocols have been deprecated and users are
|
||||
* <a href="https://openid.net/specs/openid-connect-migration-1_0.html">encouraged to migrate</a>
|
||||
* to <a href="https://openid.net/connect/">OpenID Connect</a>, which is supported by <code>spring-security-oauth2</code>.
|
||||
* @author Luke Taylor
|
||||
* @since 3.1
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<!-- NOTE: The OpenID 1.0 and 2.0 protocols have been deprecated and users are
|
||||
<a href="https://openid.net/specs/openid-connect-migration-1_0.html">encouraged to migrate</a>
|
||||
to <a href="https://openid.net/connect/">OpenID Connect</a>, which is supported by <code>spring-security-oauth2</code>. -->
|
||||
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
|
||||
<h1>OpenID Sample Home Page</h1>
|
||||
|
||||
<p><strong>
|
||||
NOTE: The OpenID 1.0 and 2.0 protocols have been deprecated and users are
|
||||
<a href="https://openid.net/specs/openid-connect-migration-1_0.html">encouraged to migrate</a>
|
||||
to <a href="https://openid.net/connect/">OpenID Connect</a>, which is supported by <code>spring-security-oauth2</code>.
|
||||
</strong></p>
|
||||
|
||||
<sec:authentication property='principal.newUser' var='isNew' />
|
||||
<p>
|
||||
Welcome<c:if test="${!isNew}"> back,</c:if> <sec:authentication property='principal.name' />!
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
|
||||
<body>
|
||||
|
||||
<p><strong>
|
||||
NOTE: The OpenID 1.0 and 2.0 protocols have been deprecated and users are
|
||||
<a href="https://openid.net/specs/openid-connect-migration-1_0.html">encouraged to migrate</a>
|
||||
to <a href="https://openid.net/connect/">OpenID Connect</a>, which is supported by <code>spring-security-oauth2</code>.
|
||||
</strong></p>
|
||||
|
||||
<c:if test="${not empty param.login_error}">
|
||||
<font color="red">
|
||||
Your login attempt was not successful, try again.<br/><br/>
|
||||
|
||||
Reference in New Issue
Block a user