com.nimbusds.openid.connect.provider.claims.source.spi.ServletInitContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oidc-claims-source-spi Show documentation
Show all versions of oidc-claims-source-spi Show documentation
Service Provider Interface (SPI) for sourcing OpenID Connect
1.0 claims
package com.nimbusds.openid.connect.provider.claims.source.spi;
import java.io.InputStream;
import javax.servlet.ServletContext;
/**
* Servlet-based initialisation context.
*/
public class ServletInitContext implements InitContext {
/**
* The servlet context.
*/
private final ServletContext servletContext;
/**
* Creates a new servlet-based initialisation context.
*
* @param servletContext The servlet context. Must not be {@code null}.
*/
public ServletInitContext(final ServletContext servletContext) {
if (servletContext == null)
throw new IllegalArgumentException("The servlet context must not be null");
this.servletContext = servletContext;
}
/**
* Returns the servlet context.
*
* @return The servlet context.
*/
public ServletContext getServletContext() {
return servletContext;
}
@Override
public InputStream getResourceAsStream(final String path) {
return servletContext.getResourceAsStream(path);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy