com.nimbusds.openid.connect.provider.spi.InitContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of c2id-server-sdk Show documentation
Show all versions of c2id-server-sdk Show documentation
SDK for Connect2id Server extensions, such as OpenID Connect claims
sources and OAuth 2.0 grant handlers
package com.nimbusds.openid.connect.provider.spi;
import jakarta.servlet.ServletContext;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.infinispan.manager.EmbeddedCacheManager;
import java.io.InputStream;
/**
* Context for the initialisation of SPI implementations.
*
* Provides:
*
*
* - Access to the web application context.
*
- A method to retrieve a configuration or another file in the web
* application package.
*
- Access to the Infinispan cache manager.
*
*/
public interface InitContext {
/**
* Returns the servlet context.
*
* @return The servlet context.
*/
ServletContext getServletContext();
/**
* Returns the resource located at the named path as an input stream.
* Has the same behaviour as
* {@link jakarta.servlet.ServletContext#getResourceAsStream}.
*
* @param path The path to the resource, must begin with a '/' and is
* interpreted as relative to the web application root.
* Must not be {@code null}.
*
* @return The resource as an input stream, or {@code null} if no
* resource exists at the specified path.
*/
@Nullable InputStream getResourceAsStream(final String path);
/**
* Returns the Infinispan cache manager.
*
* @return The Infinispan cache manager.
*/
EmbeddedCacheManager getInfinispanCacheManager();
}