Class ServiceTicketValidator

  • Direct Known Subclasses:
    ProxyTicketValidator

    public class ServiceTicketValidator
    extends Object
    Validates STs and optionally retrieves PGT IOUs. Designed with a bean-like interface for simplicity and generality.
    • Field Detail

      • casValidateUrl

        protected String casValidateUrl
      • proxyCallbackUrl

        protected String proxyCallbackUrl
      • service

        protected String service
      • pgtIou

        protected String pgtIou
      • errorCode

        protected String errorCode
      • errorMessage

        protected String errorMessage
      • entireResponse

        protected String entireResponse
      • renew

        protected boolean renew
      • attemptedAuthentication

        protected boolean attemptedAuthentication
      • successfulAuthentication

        protected boolean successfulAuthentication
    • Constructor Detail

      • ServiceTicketValidator

        public ServiceTicketValidator()
    • Method Detail

      • setCasValidateUrl

        public void setCasValidateUrl​(String x)
        Sets the CAS validation URL to use when validating tickets and retrieving PGT IOUs.
      • getCasValidateUrl

        public String getCasValidateUrl()
        Gets the CAS validation URL to use when validating tickets and retrieving PGT IOUs.
      • setProxyCallbackUrl

        public void setProxyCallbackUrl​(String x)
        Sets the callback URL, owned logically by the calling service, to receive the PGTid/PGTiou mapping.
      • setRenew

        public void setRenew​(boolean b)
        Sets the "renew" flag on authentication. When set to "true", authentication will only succeed if this was an initial login (forced by the "renew" flag being set on login).
      • getProxyCallbackUrl

        public String getProxyCallbackUrl()
        Gets the callback URL, owned logically by the calling service, to receive the PGTid/PGTiou mapping.
      • setServiceTicket

        public void setServiceTicket​(String x)
        Sets the ST to validate.
      • setService

        public void setService​(String x)
        Sets the service to use when validating.
      • getUser

        public String getUser()
        Returns the strongly authenticated username.
      • getPgtIou

        public String getPgtIou()
        Returns the PGT IOU returned by CAS.
      • isAuthenticationSuccesful

        public boolean isAuthenticationSuccesful()
        Returns true if the most recent authentication attempted succeeded, false otherwise.
      • getErrorMessage

        public String getErrorMessage()
        Returns an error message if CAS authentication failed.
      • getErrorCode

        public String getErrorCode()
        Returns CAS's error code if authentication failed.
      • getResponse

        public String getResponse()
        Retrieves CAS's entire response, if authentication was succsesful.
      • clear

        protected void clear()
        Clears internally manufactured state.