Class TrustChainResolver


  • public class TrustChainResolver
    extends Object
    Trust chain resolver.

    Related specifications:

    • OpenID Connect Federation 1.0, section 7.
    • Constructor Detail

      • TrustChainResolver

        public TrustChainResolver​(EntityID trustAnchor)
        Creates a new trust chain resolver with a single trust anchor.
        Parameters:
        trustAnchor - The trust anchor. Must not be null.
      • TrustChainResolver

        public TrustChainResolver​(EntityID trustAnchor,
                                  com.nimbusds.jose.jwk.JWKSet trustAnchorJWKSet)
        Creates a new trust chain resolver with a single trust anchor.
        Parameters:
        trustAnchor - The trust anchor. Must not be null.
        trustAnchorJWKSet - The trust anchor public JWK set, null if not available.
      • TrustChainResolver

        public TrustChainResolver​(Map<EntityID,​com.nimbusds.jose.jwk.JWKSet> trustAnchors,
                                  int httpConnectTimeoutMs,
                                  int httpReadTimeoutMs)
        Creates a new trust chain resolver with multiple trust anchors.
        Parameters:
        trustAnchors - The trust anchors with their public JWK sets (if available). Must contain at least one anchor.
        httpConnectTimeoutMs - The HTTP connect timeout in milliseconds, zero means timeout determined by the underlying HTTP client.
        httpReadTimeoutMs - The HTTP read timeout in milliseconds, zero means timout determined by the underlying HTTP client.
      • TrustChainResolver

        public TrustChainResolver​(Map<EntityID,​com.nimbusds.jose.jwk.JWKSet> trustAnchors,
                                  com.nimbusds.openid.connect.sdk.federation.trust.EntityStatementRetriever statementRetriever)
        Creates new trust chain resolver.
        Parameters:
        trustAnchors - The trust anchors with their public JWK sets. Must contain at least one anchor.
        statementRetriever - The entity statement retriever to use. Must not be null.
    • Method Detail

      • getTrustAnchors

        public Map<EntityID,​com.nimbusds.jose.jwk.JWKSet> getTrustAnchors()
        Returns the configured trust anchors.
        Returns:
        The trust anchors with their public JWK sets (if available). Contains at least one anchor.
      • getEntityStatementRetriever

        public com.nimbusds.openid.connect.sdk.federation.trust.EntityStatementRetriever getEntityStatementRetriever()
        Returns the configured entity statement retriever.
        Returns:
        The configured entity statement retriever.
      • resolveTrustChains

        public TrustChainSet resolveTrustChains​(EntityID target)
                                         throws ResolveException
        Resolves the trust chains for the specified target.
        Parameters:
        target - The target. Must not be null.
        Returns:
        The resolved trust chains, containing at least one valid and verified chain.
        Throws:
        ResolveException - If no trust chain could be resolved.