Class AbstractOIDCMetadataResolver<MetadataIdentifier,​MetadataType>

    • Field Detail

      • log

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

        private String logPrefix
        Logging prefix.
      • satisfyAnyPredicates

        private boolean satisfyAnyPredicates
        Flag which determines whether predicates used in filtering are connected by a logical 'OR' (true) or by logical 'AND' (false). Defaults to false.
      • failFastInitialization

        private boolean failFastInitialization
        Whether problems during initialization should cause the provider to fail or go on without metadata. The assumption being that in most cases a provider will recover at some point in the future. Default: true.
    • Constructor Detail

      • AbstractOIDCMetadataResolver

        protected AbstractOIDCMetadataResolver​(@Nonnull
                                               MetadataCache<MetadataType> metadataCache)
        Constructor.
        Parameters:
        metadataCache - the metadata cache to use.
    • Method Detail

      • getLogPrefix

        @Nonnull
        @NotEmpty
        protected String getLogPrefix()
        Return a prefix for logging messages for this component.
        Returns:
        a string for insertion at the beginning of any log messages
      • predicateFilterCandidates

        protected Iterable<MetadataType> predicateFilterCandidates​(@Nonnull
                                                                   Iterable<MetadataType> candidates,
                                                                   @Nonnull
                                                                   CriteriaSet criteria,
                                                                   boolean onEmptyPredicatesReturnEmpty)
                                                            throws ResolverException
        Filter the supplied candidates by resolving predicates from the supplied criteria and applying the predicates to return a filtered Iterable.
        Parameters:
        candidates - the candidates to evaluate
        criteria - the criteria set to evaluate
        onEmptyPredicatesReturnEmpty - if true and no predicates are supplied, then return an empty iterable; otherwise return the original input candidates
        Returns:
        an iterable of the candidates filtered by the resolved predicates
        Throws:
        ResolverException - if there is a fatal error during resolution
      • isSatisfyAnyPredicates

        public boolean isSatisfyAnyPredicates()
        Get the flag indicating whether resolved credentials may satisfy any predicates (i.e. connected by logical 'OR') or all predicates (connected by logical 'AND').

        Defaults to false.

        Returns:
        true if must satisfy all, false otherwise
      • setSatisfyAnyPredicates

        public void setSatisfyAnyPredicates​(boolean flag)
        Set the flag indicating whether resolved credentials may satisfy any predicates (i.e. connected by logical 'OR') or all predicates (connected by logical 'AND').

        Defaults to false.

        Parameters:
        flag - true if must satisfy all, false otherwise
      • setCriterionPredicateRegistry

        public void setCriterionPredicateRegistry​(@Nullable
                                                  CriterionPredicateRegistry<MetadataType> registry)
        Set the registry used in resolving predicates from criteria.
        Parameters:
        registry - the registry instance to use
      • getCache

        @Nonnull
        protected MetadataCache<MetadataType> getCache()
        Get the metadata cache currently in use by the metadata resolver.
        Returns:
        the current effective entity backing store
      • isFailFastInitialization

        public boolean isFailFastInitialization()
        Gets whether problems during initialization should cause the provider to fail or go on without metadata. The assumption being that in most cases a provider will recover at some point in the future.
        Returns:
        whether problems during initialization should cause the provider to fail
      • setFailFastInitialization

        public void setFailFastInitialization​(boolean failFast)
        Sets whether problems during initialization should cause the provider to fail or go on without metadata. The assumption being that in most cases a provider will recover at some point in the future.
        Parameters:
        failFast - whether problems during initialization should cause the provider to fail