All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nimbusds.openid.connect.provider.spi.InitContext Maven / Gradle / Ivy

Go to download

Toolkit for developing Connect2id Server extensions, such as custom OpenID Connect claims sources and grant handlers.

There is a newer version: 5.11
Show newest version
package com.nimbusds.openid.connect.provider.spi;


import java.io.InputStream;
import java.net.URI;

import javax.servlet.ServletContext;

import com.nimbusds.oauth2.sdk.id.Issuer;
import org.infinispan.manager.EmbeddedCacheManager;


/**
 * Context for the initialisation of SPI implementations.
 *
 * 

Features: * *

    *
  • Provides a method to retrieve a configuration or another file from * the web application. *
  • Provides methods to obtain the OpenID Provider issuer identifier and * token endpoint URI, which may be used to set the accepted audience * values for SAML 2.0 or JWT bearer grant handlers. *
  • Provides a service context for accessing selected Connect2id server * components that may be required in order to process claims or grant * handler requests. *
*/ 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 javax.servlet.ServletContext#getResourceAsStream}. * * @param path The path to the resource, must be 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. */ InputStream getResourceAsStream(final String path); /** * Returns the Infinispan cache manager. * * @return The Infinispan cache manager. */ EmbeddedCacheManager getInfinispanCacheManager(); /** * Returns the OpenID Provider (OP) issuer identifier. May be used to * set the accepted audience values for SAML 2.0 or JWT bearer grant * handlers. * * @return The OpenID Provider (OP) issuer identifier. */ Issuer getOPIssuer(); /** * Returns the token endpoint of the OpenID Provider (OP) / * Authorisation Server (AS). May be used to set the accepted audience * values for SAML 2.0 or JWT bearer grant handlers. * * @return The token endpoint URI. */ URI getTokenEndpointURI(); /** * Returns a service context for accessing selected Connect2id server * components that may be required in order to process claims or grant * handler requests. The service context is only available during SPI * request processing. Attempting to use it during SPI * {@link Lifecycle#init ininitialisation} will produce an * {@link IllegalStateException}. * * @return The service context. */ ServiceContext getServiceContext(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy