Class BuildRequestObjectTest
- java.lang.Object
-
- net.shibboleth.idp.plugin.authn.oidc.rp.impl.AbstractOIDCTest
-
- net.shibboleth.idp.plugin.authn.oidc.rp.impl.BuildRequestObjectTest
-
public class BuildRequestObjectTest extends AbstractOIDCTest
Tests for theBuildRequestObjectaction.
-
-
Field Summary
Fields Modifier and Type Field Description private net.shibboleth.idp.plugin.authn.oidc.rp.impl.BuildRequestObjectactionThe action to test.private net.shibboleth.oidc.profile.config.impl.DefaultOIDCAuthorizationConfigurationoidcAuthzConfigThe profile config.private net.shibboleth.idp.profile.context.RelyingPartyContextrpcThe RPC.-
Fields inherited from class net.shibboleth.idp.plugin.authn.oidc.rp.impl.AbstractOIDCTest
ac, ACCESS_TOKEN_RESPONSE, ACCESS_TOKEN_RESPONSE_NO_ACCESSTOKEN, ACCESS_TOKEN_RESPONSE_NO_IDTOKEN, authnRequest, CLIENT_METADATA, GOOD_PROVIDER_CONFIGURATION_INFO, partyConfig, peerEntityCtx, prc, providerCtx, rootPrc, src, TOKEN_RESPONSE_ERROR, USERINFO_RESPONSE, USERINFO_RESPONSE_JWE, USERINFO_RESPONSE_JWS
-
-
Constructor Summary
Constructors Constructor Description BuildRequestObjectTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanisValidJSON(String json)Is the string valid JSON.voidsetup()Setup the various contexts.voidtestBuildRequestObject_Success()Build a request object with the correct claims.voidtestBuildRequestObject_WithACRs_ClaimsNotSupported_Success()Test building acr_values when the claims claim is not supported.voidtestBuildRequestObject_WithACRs_Success()Build a request object with the correct set of ACRs.voidtestBuildRequestObject_WithACRsAndExistingACRs_Success()Test build a request object with ACRS when ACRs have been requested and claims configured.voidtestBuildRequestObject_WithACRsAndExistingACRs_WithSingleValue_Success()Test build a request object with ACRS when ACRs have been requested and claims configured.voidtestBuildRequestObject_WithACRsAndExistingACRsAndClaims_Success()Test build ACRs into an existing set of requested claims.voidtestBuildRequestObject_WithACRsAndExistingRequestedClaims_Success()Test build a request object with requested claims and ACRs.voidtestBuildRequestObject_WithRequestedClaims_Success()Test build request object with requested claims.-
Methods inherited from class net.shibboleth.idp.plugin.authn.oidc.rp.impl.AbstractOIDCTest
convertHttpResponseToJSONObject
-
-
-
-
Field Detail
-
action
private net.shibboleth.idp.plugin.authn.oidc.rp.impl.BuildRequestObject action
The action to test.
-
rpc
private net.shibboleth.idp.profile.context.RelyingPartyContext rpc
The RPC.
-
oidcAuthzConfig
private net.shibboleth.oidc.profile.config.impl.DefaultOIDCAuthorizationConfiguration oidcAuthzConfig
The profile config.
-
-
Method Detail
-
setup
@BeforeMethod public void setup() throws ExceptionDescription copied from class:AbstractOIDCTestSetup the various contexts.- Overrides:
setupin classAbstractOIDCTest- Throws:
Exception- on error
-
testBuildRequestObject_Success
public void testBuildRequestObject_Success() throws ComponentInitializationExceptionBuild a request object with the correct claims.- Throws:
ComponentInitializationException- on error.
-
testBuildRequestObject_WithACRs_Success
public void testBuildRequestObject_WithACRs_Success() throws ComponentInitializationExceptionBuild a request object with the correct set of ACRs.- Throws:
ComponentInitializationException- on error
-
testBuildRequestObject_WithACRs_ClaimsNotSupported_Success
public void testBuildRequestObject_WithACRs_ClaimsNotSupported_Success() throws ComponentInitializationExceptionTest building acr_values when the claims claim is not supported.- Throws:
ComponentInitializationException- on error
-
testBuildRequestObject_WithACRsAndExistingRequestedClaims_Success
public void testBuildRequestObject_WithACRsAndExistingRequestedClaims_Success() throws ComponentInitializationExceptionTest build a request object with requested claims and ACRs.- Throws:
ComponentInitializationException- on error
-
testBuildRequestObject_WithACRsAndExistingACRs_Success
public void testBuildRequestObject_WithACRsAndExistingACRs_Success() throws ComponentInitializationExceptionTest build a request object with ACRS when ACRs have been requested and claims configured. These should be merged in.- Throws:
ComponentInitializationException- on error
-
testBuildRequestObject_WithACRsAndExistingACRs_WithSingleValue_Success
public void testBuildRequestObject_WithACRsAndExistingACRs_WithSingleValue_Success() throws ComponentInitializationExceptionTest build a request object with ACRS when ACRs have been requested and claims configured. These should be merged in.- Throws:
ComponentInitializationException- on error
-
testBuildRequestObject_WithACRsAndExistingACRsAndClaims_Success
public void testBuildRequestObject_WithACRsAndExistingACRsAndClaims_Success() throws ComponentInitializationExceptionTest build ACRs into an existing set of requested claims.- Throws:
ComponentInitializationException- on error
-
testBuildRequestObject_WithRequestedClaims_Success
public void testBuildRequestObject_WithRequestedClaims_Success() throws ComponentInitializationExceptionTest build request object with requested claims.- Throws:
ComponentInitializationException- on error
-
isValidJSON
private boolean isValidJSON(String json)
Is the string valid JSON.- Parameters:
json- the json to test- Returns:
- true if valid, false otherwise.
-
-