Hi !
I am trying to add user-approval-page attribute, giving me to 'authorization-server' element in my applicationContext.xml, which is giving me following error. I could however add authorization-endpoint-url and token-endpoint-url with no such complains. I am using spring-security-oauth2 1.0.0.M5.
I am using following ns:
Code:<beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:oauth="http://www.springframework.org/schema/security/oauth2" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-1.0.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd">
Code:<oauth:authorization-server client-details-service-ref="clientDetailsService" token-services-ref="tokenServices" authorization-endpoint-url="/authorize" token-endpoint-url="/token" user-approval-page="/oauth/confirm_access"> <!--oauth:authorization-code services-ref="authorizationCodeServices" user-approval-page="forward:/confirm_access"/--> <oauth:authorization-code services-ref="authorizationCodeServices" /> <oauth:implicit /> <oauth:refresh-token /> <oauth:client-credentials /> <oauth:password /> </oauth:authorization-server>Thanks,Code:[DEBUG] PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-3.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd [DEBUG] PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/security/spring-security-3.1.xsd] in classpath: org/springframework/security/config/spring-security-3.1.xsd [DEBUG] PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/util/spring-util-3.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-util-3.0.xsd [DEBUG] PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/tool/spring-tool-3.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-tool-3.0.xsd [DEBUG] PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/security/spring-security-oauth2-1.0.xsd] in classpath: org/springframework/security/oauth/spring-security-oauth2-1.0.xsd [ERROR] ContextLoader - Context initialization failed <org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 78 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'user-approval-page' is not allowed to appear in element 'oauth:authorization-server'.>org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 78 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'user-approval-page' is not allowed to appear in element 'oauth:authorization-server'. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
Sam


Reply With Quote