Class SetRefreshTokenToResponseContextTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.BaseOIDCResponseActionTest
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.SetRefreshTokenToResponseContextTest
-
public class SetRefreshTokenToResponseContextTest extends BaseOIDCResponseActionTest
SetRefreshTokenToResponseContextunit test.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.BaseOIDCResponseActionTest
BaseOIDCResponseActionTest.MockRevocationCache
-
-
Field Summary
Fields Modifier and Type Field Description private net.shibboleth.idp.plugin.oidc.op.profile.impl.SetRefreshTokenToResponseContextactionprivate booleanenforceRotation(package private) RevocationCacherevocationCache-
Fields inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.BaseOIDCResponseActionTest
clientId, credentialEC256, credentialEC384, credentialEC521, credentialHMAC, credentialRSA, idGenerator, metadataCtx, profileRequestCtx, request, requestCtx, respCtx, rpCtx, subject
-
-
Constructor Summary
Constructors Constructor Description SetRefreshTokenToResponseContextTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidinit()protected net.shibboleth.idp.plugin.oidc.op.profile.impl.SetRefreshTokenToResponseContextinitAction(Function<ProfileRequestContext,BiFunction<ProfileRequestContext,Map<String,Object>,Map<String,Object>>> manipulationStrategy)voidtestFailNoProfileConf()fails as there is no profile conf.voidtestFailNoRPCtx()fails as there is no rp ctx.voidtestFailNoToken()fails as there no token to derive refresh token from.voidtestFailTokenNotCodeOrRefresh()fails as the token is of wrong type.voidtestFailWithExpiredRefreshRotationEnforced()voidtestNoToken()There is no offline_access scope.voidtestSuccessViaCode()Basic success case.voidtestSuccessViaCodeWithCustomClaim()voidtestSuccessViaRefresh()voidtestSuccessViaRefreshRotationEnforced()voidtestSuccessViaRefreshWithCustomClaim()-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.BaseOIDCResponseActionTest
addEntryToMap, getDataSealer, initializeDataSealer, setAuthenticationRequest, setIdTokenToResponseContext, setTokenRequest, setUp, setUserInfoRequest, setUserInfoResponseToResponseContext, signIdTokenInResponseContext, signUserInfoResponseInResponseContext
-
-
-
-
Field Detail
-
action
private net.shibboleth.idp.plugin.oidc.op.profile.impl.SetRefreshTokenToResponseContext action
-
revocationCache
RevocationCache revocationCache
-
enforceRotation
private boolean enforceRotation
-
-
Method Detail
-
init
@BeforeMethod private void init() throws ComponentInitializationException, NoSuchAlgorithmException, URISyntaxException
-
initAction
protected net.shibboleth.idp.plugin.oidc.op.profile.impl.SetRefreshTokenToResponseContext initAction(Function<ProfileRequestContext,BiFunction<ProfileRequestContext,Map<String,Object>,Map<String,Object>>> manipulationStrategy) throws ComponentInitializationException, NoSuchAlgorithmException
-
testSuccessViaCode
public void testSuccessViaCode() throws ComponentInitializationException, NoSuchAlgorithmException, URISyntaxException, ParseException, DataSealerExceptionBasic success case.
-
testSuccessViaCodeWithCustomClaim
public void testSuccessViaCodeWithCustomClaim() throws ComponentInitializationException, NoSuchAlgorithmException, URISyntaxException, ParseException, DataSealerException
-
testSuccessViaRefresh
public void testSuccessViaRefresh() throws ComponentInitializationException, NoSuchAlgorithmException, URISyntaxException, ParseException, DataSealerException
-
testSuccessViaRefreshWithCustomClaim
public void testSuccessViaRefreshWithCustomClaim() throws ComponentInitializationException, NoSuchAlgorithmException, URISyntaxException, ParseException, DataSealerException
-
testSuccessViaRefreshRotationEnforced
public void testSuccessViaRefreshRotationEnforced() throws ComponentInitializationException, NoSuchAlgorithmException, URISyntaxException, ParseException, DataSealerException
-
testFailWithExpiredRefreshRotationEnforced
public void testFailWithExpiredRefreshRotationEnforced() throws ComponentInitializationException, NoSuchAlgorithmException, URISyntaxException, ParseException, DataSealerException
-
testNoToken
public void testNoToken() throws ComponentInitializationException, NoSuchAlgorithmException, URISyntaxException, ParseException, DataSealerExceptionThere is no offline_access scope.
-
testFailNoRPCtx
public void testFailNoRPCtx() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxExceptionfails as there is no rp ctx.
-
testFailNoProfileConf
public void testFailNoProfileConf() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxExceptionfails as there is no profile conf.
-
testFailTokenNotCodeOrRefresh
public void testFailTokenNotCodeOrRefresh() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxExceptionfails as the token is of wrong type.
-
testFailNoToken
public void testFailNoToken() throws NoSuchAlgorithmException, ComponentInitializationException, URISyntaxExceptionfails as there no token to derive refresh token from.
-
-