001package com.nimbusds.openid.connect.provider.spi; 002 003 004import com.nimbusds.oauth2.sdk.id.ClientID; 005import com.nimbusds.openid.connect.provider.spi.jwt.JWTIssuer; 006import com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation; 007 008 009/** 010 * Service context for accessing selected Connect2id server components that may 011 * be required in order to process claims or grant handler requests. The 012 * exposed methods are only available during SPI request processing. Attempting 013 * to access these methods during SPI {@link Lifecycle#init ininitialisation} 014 * will produce an {@link IllegalStateException}. 015 * 016 * <p>This interface may be extended in future with additional methods to aid 017 * processing of claims and grant handler requests. Contact Connect2id support 018 * if you think you would need such an extension. 019 */ 020public interface ServiceContext { 021 022 023 /** 024 * Gets the information (metadata) for a registered OAuth 2.0 / OpenID 025 * Connect client. 026 * 027 * @param clientID The client ID. Must not be {@code null}. 028 * 029 * @return The client information, {@code null} if the client wasn't 030 * found. 031 */ 032 OIDCClientInformation getOIDCClientInformation(final ClientID clientID); 033 034 035 /** 036 * Gets a JSON Web Token (JWT) issuer interface exposed by the 037 * Connect2id server. Intended for issuing JWTs created by SPI 038 * implementations, for example security events (SET). 039 * 040 * @return The JWT issuer. 041 */ 042 JWTIssuer getJWTIssuer(); 043}