Class ValidateGrantTest
- 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.ValidateGrantTest
-
public class ValidateGrantTest extends BaseOIDCResponseActionTest
ValidateGrantunit test.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classValidateGrantTest.DeliveryClaimsSet-
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 (package private) TokenClaimsSetacClaimsprivate net.shibboleth.idp.plugin.oidc.op.profile.impl.ValidateGrantaction(package private) URIcallback(package private) com.nimbusds.oauth2.sdk.AuthorizationGrantcodeGrant(package private) TokenClaimsSetrfClaims(package private) com.nimbusds.oauth2.sdk.RefreshTokenGrantrfGrant(package private) StringrootTokenId(package private) MemoryStorageServicestorageService-
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 ValidateGrantTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static com.nimbusds.oauth2.sdk.AuthorizationCodebuildAuthorizationCode(String clientId, String issuer, String userPrincipal, String sub, String callbackUrl)static com.nimbusds.oauth2.sdk.AuthorizationCodebuildAuthorizationCode(String clientId, String issuer, String userPrincipal, String sub, String callbackUrl, String scope)static com.nimbusds.oauth2.sdk.AuthorizationCodebuildAuthorizationCode(String clientId, String issuer, String userPrincipal, String sub, String callbackUrl, String codeChallenge, String scope)static com.nimbusds.oauth2.sdk.AuthorizationCodebuildAuthorizationCode(String clientId, String issuer, String userPrincipal, String sub, String callbackUrl, String codeChallenge, net.minidev.json.JSONObject deliveryClaims, net.minidev.json.JSONObject deliveryClaimsIDToken, net.minidev.json.JSONObject deliveryClaimsUserInfo, String scope)static TokenClaimsSetbuildTokenClaimsSet(String clientId, String issuer, String userPrincipal, String sub, String callbackUrl, String codeChallenge, net.minidev.json.JSONObject deliveryClaims, net.minidev.json.JSONObject deliveryClaimsIDToken, net.minidev.json.JSONObject deliveryClaimsUserInfo, String scope)private voidinit()private voidinit(boolean refreshTokensEnabled)private voidinit(boolean refreshTokensEnabled, RevocationCache revocationCache, Function<ProfileRequestContext,Duration> revocationLifetimeLookup)protected voidsetupStorage()voidtestAuthorizeCodeReplayed()voidtestAuthorizeCodeSuccess()voidtestClientCredentialsSuccess()voidtestExpired()voidtestMixGrant()voidtestNoDataSealer()voidtestNoReplayCache()voidtestNoRevocationCache()voidtestRefreshTokenAuthorizationGrantRevoked()voidtestRefreshTokenNotEnabled()voidtestRefreshTokenReplayed()voidtestRefreshTokenRevokedShouldRevokeAuthorizationCode()voidtestRefreshTokenSuccess()voidtestTokenRevocationViaRevokedTokenFailsReturnsInvalidProfileConfig()voidtestWrongClient()-
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.ValidateGrant action
-
acClaims
TokenClaimsSet acClaims
-
rfClaims
TokenClaimsSet rfClaims
-
codeGrant
com.nimbusds.oauth2.sdk.AuthorizationGrant codeGrant
-
rfGrant
com.nimbusds.oauth2.sdk.RefreshTokenGrant rfGrant
-
callback
URI callback
-
storageService
MemoryStorageService storageService
-
rootTokenId
String rootTokenId
-
-
Method Detail
-
setupStorage
@BeforeMethod protected void setupStorage() throws ComponentInitializationException
- Throws:
ComponentInitializationException
-
init
private void init(boolean refreshTokensEnabled, RevocationCache revocationCache, Function<ProfileRequestContext,Duration> revocationLifetimeLookup) throws Exception- Throws:
Exception
-
buildAuthorizationCode
public static com.nimbusds.oauth2.sdk.AuthorizationCode buildAuthorizationCode(String clientId, String issuer, String userPrincipal, String sub, String callbackUrl) throws Exception
- Throws:
Exception
-
buildAuthorizationCode
public static com.nimbusds.oauth2.sdk.AuthorizationCode buildAuthorizationCode(String clientId, String issuer, String userPrincipal, String sub, String callbackUrl, String scope) throws Exception
- Throws:
Exception
-
buildAuthorizationCode
public static com.nimbusds.oauth2.sdk.AuthorizationCode buildAuthorizationCode(String clientId, String issuer, String userPrincipal, String sub, String callbackUrl, String codeChallenge, String scope) throws Exception
- Throws:
Exception
-
buildAuthorizationCode
public static com.nimbusds.oauth2.sdk.AuthorizationCode buildAuthorizationCode(String clientId, String issuer, String userPrincipal, String sub, String callbackUrl, String codeChallenge, net.minidev.json.JSONObject deliveryClaims, net.minidev.json.JSONObject deliveryClaimsIDToken, net.minidev.json.JSONObject deliveryClaimsUserInfo, String scope) throws Exception
- Throws:
Exception
-
buildTokenClaimsSet
public static TokenClaimsSet buildTokenClaimsSet(String clientId, String issuer, String userPrincipal, String sub, String callbackUrl, String codeChallenge, net.minidev.json.JSONObject deliveryClaims, net.minidev.json.JSONObject deliveryClaimsIDToken, net.minidev.json.JSONObject deliveryClaimsUserInfo, String scope) throws Exception
- Throws:
Exception
-
testAuthorizeCodeReplayed
public void testAuthorizeCodeReplayed() throws Exception- Throws:
Exception
-
testRefreshTokenNotEnabled
public void testRefreshTokenNotEnabled() throws Exception- Throws:
Exception
-
testRefreshTokenAuthorizationGrantRevoked
public void testRefreshTokenAuthorizationGrantRevoked() throws Exception- Throws:
Exception
-
testRefreshTokenRevokedShouldRevokeAuthorizationCode
public void testRefreshTokenRevokedShouldRevokeAuthorizationCode() throws Exception- Throws:
Exception
-
testTokenRevocationViaRevokedTokenFailsReturnsInvalidProfileConfig
public void testTokenRevocationViaRevokedTokenFailsReturnsInvalidProfileConfig() throws Exception- Throws:
Exception
-
testClientCredentialsSuccess
public void testClientCredentialsSuccess() throws Exception- Throws:
Exception
-
testNoRevocationCache
public void testNoRevocationCache() throws ComponentInitializationException, NoSuchAlgorithmException
-
testNoReplayCache
public void testNoReplayCache() throws ComponentInitializationException, NoSuchAlgorithmException
-
testNoDataSealer
public void testNoDataSealer()
-
-