Skip to content

Commit

Permalink
Merge pull request #2681 from lashinijay/master-revamp-scope-endpoint
Browse files Browse the repository at this point in the history
[Spring Cleanup] Refactor oauth2 scope endpoint to remove Spring dependency
  • Loading branch information
lashinijay authored Jan 21, 2025
2 parents fece352 + db5584d commit 7782ea7
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 102 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2021, WSO2 LLC. (http://www.wso2.com).
~ Copyright (c) 2021-2025, WSO2 LLC. (http://www.wso2.com).
~
~ WSO2 LLC. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -81,25 +81,6 @@
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

public class ScopesApiServiceFactory {

private final static ScopesApiService service = new ScopesApiServiceImpl();
private static final ScopesApiService SERVICE = new ScopesApiServiceImpl();

public static ScopesApiService getScopesApi() {
return service;
return SERVICE;
}
}

This file was deleted.

19 changes: 0 additions & 19 deletions components/org.wso2.carbon.identity.oauth.scope.endpoint/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,6 @@
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
<display-name>WSO2 Identity Server Scope Endpoint</display-name>
<description>WSO2 Identity Server Scope Endpoint</description>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/beans.xml</param-value>
</context-param>

<filter>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
Expand Down Expand Up @@ -54,24 +49,32 @@
<url-pattern>*</url-pattern>
</filter-mapping>

<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

<!-- Servlet instance for /identity/oauth2/v1.0 -->
<servlet-mapping>
<servlet-name>IdentityOAuth2V1ApiServlet</servlet-name>
<url-pattern>/identity/oauth2/v1.0/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-name>IdentityOAuth2V1ApiServlet</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>jaxrs.serviceClasses</param-name>
<param-value>
org.wso2.carbon.identity.oauth.scope.endpoint.ScopesApi
</param-value>
</init-param>
<init-param>
<param-name>jaxrs.providers</param-name>
<param-value>
com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider,
org.wso2.carbon.identity.oauth.endpoint.exmapper.JsonProcessingExceptionMapper,
</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
Expand Down

0 comments on commit 7782ea7

Please sign in to comment.