Jasig/cas — pull request #743 by mmoayyed (2014-11-08 16:10:38+00:00)
Title: GoogleService: SAML response refactoring

Currently, the `GoogleAccountsService` attempts to produce and sign a saml response that is directly hardcoded into the class while our other saml-related components use opensaml to do the job. This pull pursues the following objectives:

## Goals
* Remove the hardcoded response from `GoogleAccountsService`, allow saml2 response to be generated by opensaml instead
* Remove hardcoded constants and move them into constants interfaces
* Allows the saml2 response for google to be modified and extended
* Allows future SAML2-requiring apps to take advantage of extensibility options
* Still ensures that the saml2 response is Google specific (that is not always 100% pure saml) wrt namespaces, prefixes, etc.

## How

* Removed `SamlUtils`
* Adds `AbstractSamlObjectBuilder` which is the combination of `SamlUtils` and the SAML-stuff put into the `AbstractSaml10ResponseView` class. This class is the most generic parent, with no ties or dependencies to saml1 or saml2.

Then there are:

* `Saml10ObjectBuilder`: builds saml1 specific functionality via opensaml
* `Saml20ObjectBuilder`: builds saml2 specific functionality via opensaml
* `GoogleSaml20ObjectBuilder`: builds saml2 specific to google functionality via opensaml

`GoogleAccountsService` as well as other saml components use a proper builder instance to do the job.