Class Service

java.lang.Object
net.shibboleth.idp.cas.service.Service
All Implemented Interfaces:
Principal

public class Service extends Object implements Principal
Container for metadata about a CAS service (i.e. relying party).
  • Field Details

    • serviceURL

      @Nonnull @NotEmpty private final String serviceURL
      Service URL.
    • serviceGroup

      @Nullable private final String serviceGroup
      Group to which service belongs.
    • authorizedToProxy

      private final boolean authorizedToProxy
      Proxy authorization flag.
    • singleLogoutParticipant

      private final boolean singleLogoutParticipant
      Indicates whether a service wants to receive SLO messages.
    • entityDescriptor

      @Nullable private transient EntityDescriptor entityDescriptor
      Source of service metadata based on SAML metadata.
    • roleDescriptor

      @Nullable private transient RoleDescriptor roleDescriptor
      Role for service in SAML metadata.
  • Constructor Details

    • Service

      public Service(@Nonnull @NotEmpty String url, @Nullable @NotEmpty String group, boolean proxy)
      Creates a new service that does not participate in SLO.
      Parameters:
      url - CAS service URL.
      group - Group to which service belongs.
      proxy - True to authorize proxying, false otherwise.
    • Service

      public Service(@Nonnull @NotEmpty String url, @Nullable @NotEmpty String group, boolean proxy, boolean wantsSLO)
      Creates a new service that MAY participate in SLO.
      Parameters:
      url - CAS service URL.
      group - Group to which service belongs.
      proxy - True to authorize proxying, false otherwise.
      wantsSLO - True to indicate the service wants to receive SLO messages, false otherwise.
  • Method Details

    • getName

      public String getName()
      Get the service URL.
      Specified by:
      getName in interface Principal
    • getGroup

      @Nullable public String getGroup()
      Get the group to which the service belongs.
      Returns:
      service group name
    • isAuthorizedToProxy

      public boolean isAuthorizedToProxy()
      Get whether proxying is authorized.
      Returns:
      true if proxying is authorized, false otherwise
    • isSingleLogoutParticipant

      public boolean isSingleLogoutParticipant()
      Get whether the service wants to receive SLO message.
      Returns:
      true to indicate the service wants to receive SLO messages, false otherwise
    • getEntityDescriptor

      @Nullable public EntityDescriptor getEntityDescriptor()
      Gets the SAML entity that is the source of service metadata.
      Returns:
      Entity descriptor for service defined in SAML metadata, otherwise null.
    • setEntityDescriptor

      public void setEntityDescriptor(@Nullable EntityDescriptor ed)
      Sets the SAML entity that is the source of service metadata.
      Parameters:
      ed - SAML entity descriptor.
    • getRoleDescriptor

      @Nullable public RoleDescriptor getRoleDescriptor()
      Gets the role in the SAML metadata.
      Returns:
      the role
      Since:
      4.0.0
    • setRoleDescriptor

      public void setRoleDescriptor(@Nullable RoleDescriptor role)
      Sets the role in the SAML metadata.
      Parameters:
      role - the role
      Since:
      4.0.0
    • toString

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