Class Service

  • All Implemented Interfaces:
    Principal

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

      • 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 Detail

      • 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 Detail

      • 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