Class ClientInformationSignatureSigningParametersResolver

    • Field Detail

      • log

        private final org.slf4j.Logger log
        Class logger.
      • signatureAlgorithmLookupStrategy

        private final Function<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation,​String> signatureAlgorithmLookupStrategy
        A lookup function for the signature algorithm.
      • defaultAlgorithmValue

        private final String defaultAlgorithmValue
        The default algorithm value used if lookup strategy returned null.
    • Constructor Detail

      • ClientInformationSignatureSigningParametersResolver

        public ClientInformationSignatureSigningParametersResolver​(@Nonnull @ParameterName(name="signatureAlgorithmLookupStrategy")
                                                                   Function<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation,​String> strategy,
                                                                   @Nullable @ParameterName(name="defaultAlgorithmValue")
                                                                   String defaultValue)
        Constructor.
        Parameters:
        strategy - a lookup function for the signature algorithm
        defaultValue - the default algorithm value used if lookup strategy returned null
    • Method Detail

      • getEffectiveSignatureAlgorithms

        @Nonnull
        protected List<String> getEffectiveSignatureAlgorithms​(@Nonnull
                                                               CriteriaSet criteria,
                                                               @Nonnull
                                                               Predicate<String> includeExcludePredicate)
        Get the effective list of signature algorithm URIs to consider, including application of include/exclude policy.
        Overrides:
        getEffectiveSignatureAlgorithms in class BasicSignatureSigningParametersResolver
        Parameters:
        criteria - the input criteria being evaluated
        includeExcludePredicate - the include/exclude predicate to use
        Returns:
        the list of effective algorithm URIs
      • getClientInformation

        @Nullable
        protected com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation getClientInformation​(@Nonnull
                                                                                                CriteriaSet criteria)
        Returns the client information from the given criteria set, if one was found.
        Parameters:
        criteria - the input criteria being evaluated
        Returns:
        the client information if it existed, null otherwise
      • getEffectiveSigningCredentials

        @Nonnull
        protected List<Credential> getEffectiveSigningCredentials​(@Nonnull
                                                                  CriteriaSet criteria)
        Get the effective list of signing credentials to consider. Adds the client secret credential to the list provided by the base-class, if secret is set in the metadata.
        Overrides:
        getEffectiveSigningCredentials in class BasicSignatureSigningParametersResolver
        Parameters:
        criteria - the input criteria being evaluated
        Returns:
        the list of credentials
      • convertIntoListIfEnabled

        @Nonnull
        protected List<String> convertIntoListIfEnabled​(@Nonnull
                                                        String algorithm,
                                                        @Nonnull
                                                        List<String> enabledAlgorithms)
        Returns the given algorithm in a List if it was enabled in the list of enabled algorithms. An empty list is returned if the algorithm was not enabled.
        Parameters:
        algorithm - the algorithm to be checked against the list
        enabledAlgorithms - the list of enabled algorithms
        Returns:
        the given algorithm as list if it was enabled, or an empty list if not