|
1 | 1 | /*
|
2 |
| - * Copyright 2009-2013 the original author or authors. |
| 2 | + * Copyright 2009-2019 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
41 | 41 | import org.springframework.security.config.method.GlobalMethodSecurityBeanDefinitionParser;
|
42 | 42 | import org.springframework.security.config.method.InterceptMethodsBeanDefinitionDecorator;
|
43 | 43 | import org.springframework.security.config.method.MethodSecurityMetadataSourceBeanDefinitionParser;
|
| 44 | +import org.springframework.security.config.oauth2.client.ClientRegistrationsBeanDefinitionParser; |
44 | 45 | import org.springframework.security.config.websocket.WebSocketMessageBrokerSecurityBeanDefinitionParser;
|
45 | 46 | import org.springframework.security.core.SpringSecurityCoreVersion;
|
46 | 47 | import org.springframework.util.ClassUtils;
|
@@ -86,7 +87,7 @@ public BeanDefinition parse(Element element, ParserContext pc) {
|
86 | 87 | if (!namespaceMatchesVersion(element)) {
|
87 | 88 | pc.getReaderContext()
|
88 | 89 | .fatal("You cannot use a spring-security-2.0.xsd or spring-security-3.0.xsd or spring-security-3.1.xsd schema or spring-security-3.2.xsd schema or spring-security-4.0.xsd schema "
|
89 |
| - + "with Spring Security 5.2. Please update your schema declarations to the 5.2 schema.", |
| 90 | + + "with Spring Security 5.3. Please update your schema declarations to the 5.3 schema.", |
90 | 91 | element);
|
91 | 92 | }
|
92 | 93 | String name = pc.getDelegate().getLocalName(element);
|
@@ -192,6 +193,7 @@ private void loadParsers() {
|
192 | 193 | new FilterInvocationSecurityMetadataSourceParser());
|
193 | 194 | parsers.put(Elements.FILTER_CHAIN, new FilterChainBeanDefinitionParser());
|
194 | 195 | filterChainMapBDD = new FilterChainMapBeanDefinitionDecorator();
|
| 196 | + parsers.put(Elements.CLIENT_REGISTRATIONS, new ClientRegistrationsBeanDefinitionParser()); |
195 | 197 | }
|
196 | 198 |
|
197 | 199 | if (ClassUtils.isPresent(MESSAGE_CLASSNAME, getClass().getClassLoader())) {
|
@@ -221,7 +223,7 @@ private boolean namespaceMatchesVersion(Element element) {
|
221 | 223 | private boolean matchesVersionInternal(Element element) {
|
222 | 224 | String schemaLocation = element.getAttributeNS(
|
223 | 225 | "http://www.w3.org/2001/XMLSchema-instance", "schemaLocation");
|
224 |
| - return schemaLocation.matches("(?m).*spring-security-5\\.2.*.xsd.*") |
| 226 | + return schemaLocation.matches("(?m).*spring-security-5\\.3.*.xsd.*") |
225 | 227 | || schemaLocation.matches("(?m).*spring-security.xsd.*")
|
226 | 228 | || !schemaLocation.matches("(?m).*spring-security.*");
|
227 | 229 | }
|
|
0 commit comments