Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions openig-ai/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The contents of this file are subject to the terms of the Common Development and
Distribution License (the License). You may not use this file except in compliance with the
License.

You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
specific language governing permission and limitations under the License.

When distributing Covered Software, include this CDDL Header Notice in each file and include
the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
Header, with the fields enclosed by brackets [] replaced by your own identifying
information: "Portions Copyright [year] [name of copyright owner]".

Copyright 2026 3A Systems, LLC.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openidentityplatform.openig</groupId>
<artifactId>openig-project</artifactId>
<version>6.0.3-SNAPSHOT</version>
</parent>

<artifactId>openig-ai</artifactId>
<name>OpenIG AI Module</name>
<dependencies>
<dependency>
<groupId>org.openidentityplatform.openig</groupId>
<artifactId>openig-core</artifactId>
<version>${project.version}</version>
</dependency>

<!--token rate limiter dependencies-->
<dependency>
<groupId>com.bucket4j</groupId>
<artifactId>bucket4j_jdk11-core</artifactId>
<version>8.15.0</version>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>3.2.3</version>
</dependency>


<!-- test dependencies -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-testlib</artifactId>
<version>33.5.0-jre</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2026 3A Systems LLC.
*/

package org.openidentityplatform.openig.ai;

import org.forgerock.openig.alias.ClassAliasResolver;
import org.openidentityplatform.openig.ai.filter.LLMProxyFilter;
import org.openidentityplatform.openig.ai.filter.MCPServerFeaturesFilter;

import java.util.HashMap;
import java.util.Map;

/**
* Register all the aliases supported by the {@literal openig-ai2} module.
*/
public class AiClassAliasResolver implements ClassAliasResolver {
private static final Map<String, Class<?>> ALIASES = new HashMap<>();

static {
ALIASES.put("LLMProxyFilter", LLMProxyFilter.class);
ALIASES.put("MCPServerFeaturesFilter", MCPServerFeaturesFilter.class);
}

@Override
public Class<?> resolve(final String alias) {
return ALIASES.get(alias);
}
}
Loading