0

Im using activiti and spring in project, XML manner previously configured as follows:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:security="http://www.springframework.org/schema/security"
   xmlns:oauth2="http://www.springframework.org/schema/security/oauth2"
   xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security-3.1.xsd
    http://www.springframework.org/schema/security/oauth2
    http://www.springframework.org/schema/security/spring-security-oauth2.xsd">
    <bean id="tokenServices" class="com.example.security.oauth2.wso2.TokenServiceWSO2" />
    <bean id="authenticationEntryPoint" class="org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint" />
    <security:authentication-manager alias="authenticationManager" />
    <oauth2:resource-server id="resourcesServerFilter" token-services-ref="tokenServices" />
    <security:http pattern="/services/**" create-session="stateless" entry-point-ref="authenticationEntryPoint" >
        <security:anonymous enabled="false" />
        <security:custom-filter ref="resourcesServerFilter" before="PRE_AUTH_FILTER" />
        <security:intercept-url pattern="/services/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
    </security:http>
</beans>

How is configured to convert into JAVA? Thank you very much

Vũ Bá Quang
  • 61
  • 1
  • 2
  • What is your target spring-security version, because 3.1 is pretty old. Not sure you'll find someone with accurate knowledge for that version. `spring-security-oauth2` was abandoned a while ago (2 years? I don't remember exactly) and the 6.0 version of `spring-security` is on its last milestones (should be released in November...) – ch4mp Sep 29 '22 at 20:46
  • I am following the instructions of the problem `OAuth 2.0 using Spring Security + WSO2 Identity Server` here [link](https://stackoverflow.com/questions/27551358/oauth-2-0-using-spring-security-wso2-identity-server) ,I use a `spring-security-oauth2` with version `2.3.4`, `spring-security` `5.5.3`, please help me – Vũ Bá Quang Sep 30 '22 at 03:11
  • Answer is **7 years old** (2015)... and no, I won't help with `spring-security-oauth2`. See [those tutorials](https://github.com/ch4mpy/spring-addons/blob/master/samples/tutorials) for up to date resource-server configuration. – ch4mp Sep 30 '22 at 04:26
  • Thank you very much, I will learn more about the material you send ! – Vũ Bá Quang Sep 30 '22 at 04:38

0 Answers0