Class ProxyAuthenticationPrincipal

java.lang.Object
net.shibboleth.idp.authn.principal.ProxyAuthenticationPrincipal
All Implemented Interfaces:
Principal, Predicate<ProfileRequestContext>

public class ProxyAuthenticationPrincipal
extends Object
implements Principal, Predicate<ProfileRequestContext>
Principal that wraps a set of proxied authentication authorities and any restrictions on subsequent re-use.

The Predicate interface implements restriction logic that returns true iff the restrictions embedded in the object do NOT apply to the input request.

Since:
3.4.0
  • Field Details

  • Constructor Details

    • ProxyAuthenticationPrincipal

      public ProxyAuthenticationPrincipal()
      Constructor.
    • ProxyAuthenticationPrincipal

      public ProxyAuthenticationPrincipal​(@Nonnull @NonnullElements Collection<String> proxiedAuthorities)
      Constructor.
      Parameters:
      proxiedAuthorities - initial set of authorities
  • Method Details

    • getName

      @Nonnull @NotEmpty public String getName()
      Specified by:
      getName in interface Principal
    • getAuthorities

      @Nonnull @NonnullElements @Live public Collection<String> getAuthorities()
      Get the mutable authority collection.
      Returns:
      the authorities
    • getAudiences

      @Nonnull @NonnullElements @Live public Set<String> getAudiences()
      Get the mutable audience set, the set of relying parties for which proxying is permissable.
      Returns:
      the audiences
    • getProxyCount

      @Nullable @NonNegative public Integer getProxyCount()
      Gets the number of additional proxy hops that should be permitted.

      A value of 0 disallows further proxying, while a null implies no limit.

      Returns:
      proxy count
      Since:
      4.0.0
    • setProxyCount

      public void setProxyCount​(@Nullable @NonNegative Integer count)
      Sets the number of additional proxy hops that should be permitted.

      A value of 0 disallows further proxying, while a null implies no limit.

      Parameters:
      count - proxy count
      Since:
      4.0.0
    • test

      public boolean test​(@Nullable ProfileRequestContext input)
      Specified by:
      test in interface Predicate<ProfileRequestContext>
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Principal
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals​(Object other)
      Specified by:
      equals in interface Principal
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class Object