Class MultiRelyingPartyContext

  • All Implemented Interfaces:
    Iterable<BaseContext>

    public final class MultiRelyingPartyContext
    extends BaseContext
    BaseContext representing multiple relying parties involved in a request, usually a subcontext of ProfileRequestContext.

    The multiple parties may be accessed as a collection, by their name, or by "labels", which are specific to a given profile/scenario.

    The context also provides state management for flows to iterate over the relying parties in the context using an iterator and a "current" pointer.

    • Constructor Detail

      • MultiRelyingPartyContext

        public MultiRelyingPartyContext()
        Constructor.
    • Method Detail

      • getRelyingPartyContextById

        @Nullable
        public RelyingPartyContext getRelyingPartyContextById​(@Nonnull @NotEmpty
                                                              String id)
        Get a RP context by name/id.
        Parameters:
        id - the identifier to search for
        Returns:
        a corresponding RP context
      • getRelyingPartyContextIterator

        @Nonnull
        public Iterator<RelyingPartyContext> getRelyingPartyContextIterator​(boolean fresh)
        Get an iterator over the relying parties contained in the context.

        The first time this method is called, or if the parameter is set, it will return a fresh iterator; subsequent calls will return the same iterator.

        Modification of the underlying collection while iterating is not supported.

        Parameters:
        fresh - if true, a new iterator will be created and returned
        Returns:
        an iterator over the relying parties contained in the context
      • addRelyingPartyContext

        public void addRelyingPartyContext​(@Nonnull @NotEmpty
                                           String label,
                                           @Nonnull
                                           RelyingPartyContext context)
        Add a RP context associated with a label.
        Parameters:
        label - the label to associate with the context
        context - context to add
      • removeRelyingPartyContext

        public void removeRelyingPartyContext​(@Nonnull @NotEmpty
                                              String label,
                                              @Nonnull
                                              RelyingPartyContext context)
        Remove a RP context associated with a label.
        Parameters:
        label - the label associated with the context
        context - context to remove