私はspring-security-oauth-1.0.0.M3を使用して、spring-security 3.0とoauth2を使用するアプリケーションを開発中です。それはうまく動作します。しかし、Spring Security 3.1への移行は簡単なことではないようです。 oauthモジュールがまだサポートされているという確認を見つけることができませんでした。spring-security-oauth(oauth2の場合)をサポートしていますか?リファレンスはありますか?
例えば、OAuthのチュートリアルでは、3.0ない3.1言及:
https://github.com/SpringSource/spring-security-oauth/wiki/tutorial
そして、私は3月4日に同様の問題が発生した、以下の議論では2012年のコメントは、私はストレートのアップグレードを行うにしようとすると、春・セキュリティのOAuth 1.0.0.M3またはM4を使用して3.1に:
http://code.google.com/p/spring-security-social/wiki/Usage
具体的に私はTomcatのログでこれを参照してください。
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration
problem: Failed to import bean definitions from URL location ...
Offending resource: class path resource [spring/applicationContext.xml]; nested
exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from URL ...; nested exception is
org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class
[org.springframework.security.oauth2.config.OAuth2SecurityNamespaceHandler] for namespace
[http://www.springframework.org/schema/security/oauth2]: problem with handler class file or
dependent class; nested exception is java.lang.NoClassDefFoundError:
org/springframework/security/web/util/AntUrlPathMatcher
誰かが春セキュリティ3.1および春・セキュリティのOAuthを使用するための参照に、上記の問題、またはポイントの解決策を提案する、または他のスプリングセキュリティ3.1を使用してのOAuth2実装するためのより良い代替手段を提案することはできますか?
また、私が春のセキュリティ3.1の基本的な点を見逃している場合は、それも知っておくと便利です。
ありがとうございます!
答えははいです。サポートされています。 Sigh、Spring Securityが判明しました。Spring Security 3.1にはOAuth 1.0.0.M6が必要です(または少なくとも十分です): http://forum.springsource.org/showthread.php?123470-Spring-Security-OAuth-1- 0-0-M6-released 上記のBeanDefinitionParsingExceptionが解決されました。 – Will
これまでのところ、これは最高のリファレンスガイドのようです:https://github.com/SpringSource/spring-security-oauth/wiki/oauth2 – Will