的oauth2:自发放

时间:2013-01-24 09:48:19

标签: spring-security

我在导入spring-security-OAuth2的源代码时遇到了这个问题。我不太熟悉XML。

错误的代码是

<oauth2:authorization-server client-details-service-ref="clientDetails">
    <oauth2:authorization-code />
    <oauth2:custom-grant token-granter-ref="tokenGranter" />
</oauth2:authorization-server>

报道了

cvc-complex-type.2.4.a: Invalid content was found starting with element 'oauth2:custom-grant'. One of '{"http://www.springframework.org/schema/security/oauth2":implicit, "http:// www.springframework.org/schema/security/oauth2":refresh-token, "http://www.springframework.org/schema/security/oauth2":client-credentials, "http://www.springframework.org/schema/ security/oauth2":password}' is expected.

1 个答案:

答案 0 :(得分:0)

您使用的旧版Spring Security OAuth不支持“custom-grant”