Class AbstractOIDCTest
- java.lang.Object
-
- net.shibboleth.idp.plugin.authn.oidc.rp.impl.AbstractOIDCTest
-
- Direct Known Subclasses:
AddAuthenticationContextClassReferencesHandlerTest,AddEndpointURIHandlerTest,AddForceAuthenticationPromptHandlerTest,AddRedirectURIHandlerTest,AddRequestedClaimsHandlerTest,AddResponseTypeAndModeHandlerTest,AddScopesHandlerTest,AddStateHandlerTest,BuildPlainRequestObjectJWTTest,BuildRequestObjectTest,DefaultAccessTokenResponseDecoderTest,DefaultUserInfoResponseDecoderTest,ExchangeCodeForAccessTokenTest,NimbusAuthCodeTokenRequestEncoderTest,OIDCProviderMetadataLookupHandlerTest,ProcessEndUserClaimsTest,SimpleOIDCSubjectIdentifierCanonicalizationTest,UserInfoEndpointLookupTest,ValidateAuthenticationResponseResultTest,ValidateOAuthAccessTokenResponseTest,ValidateOIDCAuthenticationTest,ValidateResponseStateTest,ValidateUserInfoJSONObjectClaimsTest
public abstract class AbstractOIDCTest extends Object
Abstract class for tests that require context setup appropriate for an OIDC request/response.
-
-
Field Summary
Fields Modifier and Type Field Description protected net.shibboleth.idp.authn.context.AuthenticationContextacThe authentication context (above the nested prc).protected StringACCESS_TOKEN_RESPONSEReal response from openid connect tests.protected StringACCESS_TOKEN_RESPONSE_NO_ACCESSTOKENprotected StringACCESS_TOKEN_RESPONSE_NO_IDTOKENprotected net.shibboleth.oidc.profile.core.OIDCAuthenticationRequestauthnRequestThe authentication request.private static StringCLIENT_IDThe client_id.protected StringCLIENT_METADATAClient metadata.private static StringCLIENT_SECRETThe client_secret.protected StringGOOD_PROVIDER_CONFIGURATION_INFOProvider configuration.protected net.shibboleth.oidc.profile.config.impl.DefaultOIDCAuthorizationConfigurationpartyConfigThe RP config.protected net.shibboleth.oidc.profile.messaging.context.OIDCPeerEntityContextpeerEntityCtxThe request context to use.protected ProfileRequestContextprcThe profile request context to use.protected net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContextproviderCtxThe OIDC provider metadata context.private static StringREDIRECT_URI_OVERRIDEA redirect_uri override.protected ProfileRequestContextrootPrcThe root profile request context to use.protected RequestContextsrcThe request context to use.protected StringTOKEN_RESPONSE_ERRORprotected StringUSERINFO_RESPONSEMock Plain response from the UserInfo endpoint.protected StringUSERINFO_RESPONSE_JWEMock a UserInfo JWE reponse.protected StringUSERINFO_RESPONSE_JWSMock a UserInfo JWS reponse.
-
Constructor Summary
Constructors Constructor Description AbstractOIDCTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected net.minidev.json.JSONObjectconvertHttpResponseToJSONObject(org.apache.http.HttpResponse response)voidsetup()Setup the various contexts.
-
-
-
Field Detail
-
REDIRECT_URI_OVERRIDE
private static final String REDIRECT_URI_OVERRIDE
A redirect_uri override.- See Also:
- Constant Field Values
-
CLIENT_ID
private static final String CLIENT_ID
The client_id.- See Also:
- Constant Field Values
-
CLIENT_SECRET
private static final String CLIENT_SECRET
The client_secret.- See Also:
- Constant Field Values
-
GOOD_PROVIDER_CONFIGURATION_INFO
protected final String GOOD_PROVIDER_CONFIGURATION_INFO
Provider configuration.- See Also:
- Constant Field Values
-
ACCESS_TOKEN_RESPONSE
@Nonnull @NotEmpty protected final String ACCESS_TOKEN_RESPONSE
Real response from openid connect tests.- See Also:
- Constant Field Values
-
ACCESS_TOKEN_RESPONSE_NO_ACCESSTOKEN
@Nonnull @NotEmpty protected final String ACCESS_TOKEN_RESPONSE_NO_ACCESSTOKEN
- See Also:
- Constant Field Values
-
ACCESS_TOKEN_RESPONSE_NO_IDTOKEN
@Nonnull @NotEmpty protected final String ACCESS_TOKEN_RESPONSE_NO_IDTOKEN
- See Also:
- Constant Field Values
-
TOKEN_RESPONSE_ERROR
@Nonnull @NotEmpty protected final String TOKEN_RESPONSE_ERROR
- See Also:
- Constant Field Values
-
USERINFO_RESPONSE_JWE
@Nonnull @NotEmpty protected final String USERINFO_RESPONSE_JWE
Mock a UserInfo JWE reponse.- See Also:
- Constant Field Values
-
USERINFO_RESPONSE
@Nonnull @NotEmpty protected final String USERINFO_RESPONSE
Mock Plain response from the UserInfo endpoint.- See Also:
- Constant Field Values
-
USERINFO_RESPONSE_JWS
protected final String USERINFO_RESPONSE_JWS
Mock a UserInfo JWS reponse.- See Also:
- Constant Field Values
-
CLIENT_METADATA
@Nonnull protected final String CLIENT_METADATA
Client metadata.- See Also:
- Constant Field Values
-
rootPrc
protected ProfileRequestContext rootPrc
The root profile request context to use.
-
prc
protected ProfileRequestContext prc
The profile request context to use.
-
src
protected RequestContext src
The request context to use.
-
peerEntityCtx
protected net.shibboleth.oidc.profile.messaging.context.OIDCPeerEntityContext peerEntityCtx
The request context to use.
-
authnRequest
protected net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest authnRequest
The authentication request.
-
ac
protected net.shibboleth.idp.authn.context.AuthenticationContext ac
The authentication context (above the nested prc).
-
partyConfig
protected net.shibboleth.oidc.profile.config.impl.DefaultOIDCAuthorizationConfiguration partyConfig
The RP config.
-
providerCtx
protected net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContext providerCtx
The OIDC provider metadata context.
-
-