在Spring Security中结合OAuth和Basic auth

时间:2014-12-06 22:31:17

标签: java spring oauth spring-security spring-security-oauth2

我已经使用Spring Security提供的身份验证配置和运行应用程序。以下是身份验证配置:

   <http pattern="/login" security="none"/> 
   <http pattern="/datastore/list" security="none"/> 

   <http auto-config="true" use-expressions="true">
      <logout logout-url="/logout" delete-cookies="JSESSIONID" invalidate-session="true" logout-success-url="/login" />
      <form-login login-page="/login" authentication-failure-url="/login?success=false"  default-target-url="/" />
      <intercept-url pattern="/repository/**" access="isAuthenticated()" />
      <intercept-url pattern="/solr/**" access="isAuthenticated()" />
      <intercept-url pattern="/WebISG/**" access="isAuthenticated()" />
      <intercept-url pattern="/datastore/**" access="isAuthenticated()" />
      <intercept-url pattern="/*" access="isAuthenticated()" />
   </http>

   <authentication-manager alias="authenticationManager">
      <authentication-provider ref="c2rAuthenticationProvider" />
   </authentication-manager>

现在我需要添加此服务才能使用OAuth,以便用户能够将这些方法中的每一个用于方法并编写相同的URL。有可能吗?

0 个答案:

没有答案