Combine OAuth and Basic auth in Spring Security

I have an application configured and running with the authentication provided by Spring Security. Here's the authentication setup:

   <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>

      

Now I need to add the ability to use OAuth to this service so that users can use each of these methods and write the same URLs. Is it possible?

+3


source to share





All Articles