Results 1 to 4 of 4

Thread: unable to add user-approval-page

  1. #1
    Join Date
    Apr 2012
    Posts
    26

    Default unable to add user-approval-page

    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>
    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)
    Thanks,
    Sam

  2. #2
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    1.0.0.M5 is very old. My guess is the XSD has changed. Try the latest snapshot if you can because we are getting close to a new release and a lot has changed since M6 as well.

  3. #3
    Join Date
    Apr 2012
    Posts
    26

    Default

    Hi Dave,
    Which is the latest version available?From the link on github I can see M6 is latest http://shrub.appspot.com/maven.sprin...ecurity-oauth/

    Which version have you used here https://gist.github.com/2421187?

    Thanks,
    Sam
    Last edited by saamy; Apr 20th, 2012 at 04:17 PM.

  4. #4
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    The gist depends on a snapshot, so it is probably broken right now. You can see the dependencies in the pom.xml.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •