Răsfoiți Sursa

Polish gh-11665

* Add authentication-converter-ref to 6.0
* Add @Configuration to test configs
Steve Riesenberg 2 ani în urmă
părinte
comite
1aee40dcca

+ 3 - 0
config/src/main/resources/org/springframework/security/config/spring-security-6.0.rnc

@@ -667,6 +667,9 @@ opaque-token.attlist &=
 opaque-token.attlist &=
     ## Reference to an OpaqueTokenIntrospector
     attribute introspector-ref {xsd:token}?
+opaque-token.attlist &=
+    ## Reference to an OpaqueTokenAuthenticationConverter responsible for converting successful introspection result into an Authentication.
+    attribute authentication-converter-ref {xsd:token}?
 
 saml2-login =
 	## Configures authentication support for SAML 2.0 Login

+ 7 - 0
config/src/main/resources/org/springframework/security/config/spring-security-6.0.xsd

@@ -2037,6 +2037,13 @@
                 </xs:documentation>
          </xs:annotation>
       </xs:attribute>
+      <xs:attribute name="authentication-converter-ref" type="xs:token">
+         <xs:annotation>
+            <xs:documentation>Reference to an OpaqueTokenAuthenticationConverter responsible for converting successful
+                introspection result into an Authentication.
+                </xs:documentation>
+         </xs:annotation>
+      </xs:attribute>
   </xs:attributeGroup>
   
   <xs:attributeGroup name="saml2-login.attlist">

+ 1 - 0
config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurerTests.java

@@ -2463,6 +2463,7 @@ public class OAuth2ResourceServerConfigurerTests {
 
 	}
 
+	@Configuration
 	@EnableWebSecurity
 	static class OpaqueTokenAuthenticationConverterConfig extends WebSecurityConfigurerAdapter {
 

+ 1 - 0
config/src/test/java/org/springframework/security/config/web/server/OAuth2ResourceServerSpecTests.java

@@ -1075,6 +1075,7 @@ public class OAuth2ResourceServerSpecTests {
 
 	}
 
+	@Configuration
 	@EnableWebFlux
 	@EnableWebFluxSecurity
 	static class ReactiveOpaqueTokenAuthenticationConverterConfig {