Jasig/cas — pull request #420 by mmoayyed (2014-04-09 08:54:04+00:00)
Title: CAS-1439: Proxy-granting tickets must begin with their PGT prefix

https://issues.jasig.org/browse/CAS-1439

This pull fixes an inconsistency where proxy-granting ticket ids do not begin with their assigned prefix `PGT`, per the CAS protocol.

- A new `ProxyGrantingTicket` interface is introduced along with a default impl, both of which at this point are analogous to their TGT counterparts. The interface presents the correct interface.
- CAS impl is modified to take advantage of the above design, when delegating authn.
- API signatures are changed to make visible and explicit the granting of a proxy granting ticket.
- Definition of `equals()` had to be refactored and moved up to `AbstractTicket`, taking advantage of EqualsBuilder as well as `HashCodeBuilder` for consistency.

Note: It's likely that we may also opt for a `ProxyTicket` interface as well, just so the language of the protocol would be explicit (per domain-driven-design guidelines) and possibly, address and improve issues with PT expiration policies.