001package com.nimbusds.openid.connect.provider.claims.source.spi; 002 003 004import java.io.InputStream; 005 006 007/** 008 * Initialisation context. Intended to be passed from the OpenID Connect 009 * Provider (OP) server to the ClaimsSource SPI implementation. Provides a 010 * method to retrieve a configuration or other file from the web application. 011 */ 012public interface InitContext { 013 014 015 /** 016 * Returns the resource located at the named path as an input stream. 017 * Has the same behaviour as 018 * {@link javax.servlet.ServletContext#getResourceAsStream}. 019 * 020 * @param path The path to the resource, must be begin with a '/' and 021 * is interpreted as relative to the web application root. 022 * Must not be {@code null}. 023 * 024 * @return The resource as an input stream, or {@code null} if no 025 * resource exists at the specified path. 026 */ 027 public InputStream getResourceAsStream(final String path); 028}