Class AbstractOidcFlowTest

    • Constructor Detail

      • AbstractOidcFlowTest

        protected AbstractOidcFlowTest​(String id)
      • AbstractOidcFlowTest

        protected AbstractOidcFlowTest​(String id,
                                       String endId)
    • Method Detail

      • initializeMocks

        @BeforeMethod
        public void initializeMocks()
        Initialize mock request, response, and external context. Overrides to remove authorization header.
        Overrides:
        initializeMocks in class net.shibboleth.idp.test.flows.AbstractFlowTest
      • getDataSealer

        protected DataSealer getDataSealer()
      • parseResponse

        protected com.nimbusds.oauth2.sdk.Response parseResponse​(FlowExecutionResult result)
      • parseErrorResponse

        protected com.nimbusds.oauth2.sdk.ErrorResponse parseErrorResponse​(FlowExecutionResult result)
      • parseSuccessResponse

        protected <AResponseType extends com.nimbusds.oauth2.sdk.Response> AResponseType parseSuccessResponse​(FlowExecutionResult result,
                                                                                                              Class<AResponseType> clazz)
      • assertErrorDescriptionContains

        protected void assertErrorDescriptionContains​(FlowExecutionResult result,
                                                      String errorDescription)
      • setJsonRequest

        protected void setJsonRequest​(String method,
                                      String body)
      • setHttpFormRequest

        protected void setHttpFormRequest​(String method,
                                          Map<String,​String> parameters)
      • setBasicAuth

        protected void setBasicAuth​(String username,
                                    String password)
      • setRequest

        protected void setRequest​(String method,
                                  String body,
                                  String contentType)
      • storeMetadata

        protected void storeMetadata​(StorageService storageService,
                                     String clientId,
                                     String secret,
                                     com.nimbusds.oauth2.sdk.Scope scope,
                                     com.nimbusds.jose.JWSAlgorithm tokenEndpointSigAlg,
                                     com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod tokenEndpointMethod,
                                     String... redirectUri)
                              throws IOException
        Throws:
        IOException
      • storeMetadata

        protected void storeMetadata​(StorageService storageService,
                                     String clientId,
                                     String secret,
                                     com.nimbusds.oauth2.sdk.Scope scope,
                                     com.nimbusds.jose.JWSAlgorithm tokenEndpointSigAlg,
                                     com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod tokenEndpointMethod,
                                     com.nimbusds.jose.JWSAlgorithm userInfoSigAlg,
                                     String... redirectUri)
                              throws IOException
        Throws:
        IOException
      • storeMetadata

        protected void storeMetadata​(StorageService storageService,
                                     String clientId,
                                     String secret,
                                     com.nimbusds.oauth2.sdk.Scope scope,
                                     com.nimbusds.jose.JWSAlgorithm tokenEndpointSigAlg,
                                     com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod tokenEndpointMethod,
                                     com.nimbusds.jose.JWSAlgorithm userInfoSigAlg,
                                     RSAPublicKey publicKey,
                                     String... redirectUri)
                              throws IOException
        Throws:
        IOException
      • storeMetadata

        protected void storeMetadata​(StorageService storageService,
                                     String clientId,
                                     String secret,
                                     com.nimbusds.oauth2.sdk.Scope scope,
                                     com.nimbusds.jose.JWSAlgorithm tokenEndpointSigAlg,
                                     com.nimbusds.jose.JWEAlgorithm tokenEncAlg,
                                     com.nimbusds.jose.EncryptionMethod encMethod,
                                     com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod tokenEndpointMethod,
                                     com.nimbusds.jose.JWSAlgorithm userInfoSigAlg,
                                     RSAPublicKey publicKey,
                                     String... redirectUri)
                              throws IOException
        Throws:
        IOException
      • buildJsonForLegacyToken

        protected String buildJsonForLegacyToken​(String subject,
                                                 String clientId,
                                                 com.nimbusds.oauth2.sdk.Scope scope,
                                                 String type,
                                                 String... consentedClaims)
      • createSecretJWT

        protected static com.nimbusds.jwt.SignedJWT createSecretJWT​(com.nimbusds.jwt.JWTClaimsSet claimsSet,
                                                                    String clientSecret)
                                                             throws com.nimbusds.jose.JOSEException
        Throws:
        com.nimbusds.jose.JOSEException
      • createPrivateKeyJWT

        protected static com.nimbusds.jwt.SignedJWT createPrivateKeyJWT​(com.nimbusds.jwt.JWTClaimsSet claimsSet,
                                                                        RSAPrivateKey rsaPrivateKey)
                                                                 throws com.nimbusds.jose.JOSEException
        Throws:
        com.nimbusds.jose.JOSEException