Credentials credentials,
HttpMethod method)
throws AuthenticationException {
String auth = null;
if (credentials instanceof UsernamePasswordCredentials) {
UsernamePasswordCredentials usercreds =
(UsernamePasswordCredentials) credentials;
String id = usercreds.getUserName();
String pwd = usercreds.getPassword();
auth = getAuth(id, pwd);
} else if (credentials instanceof GoogleLoginAuthCredentials) {
GoogleLoginAuthCredentials gcreds =
(GoogleLoginAuthCredentials) credentials;
service = gcreds.getService();