Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.paypal.base.soap;
 
CertificateSOAPHeaderAuthStrategy is an implementation of com.paypal.base.AuthenticationStrategy which acts on com.paypal.base.credential.CertificateCredential and retrieves them as SOAP headers
public class CertificateSOAPHeaderAuthStrategy implements
Instance of ThirdPartyAuthorization
	}

Returns:
the thirdPartyAuthorization
	}

Parameters:
thirdPartyAuthorization the thirdPartyAuthorization to set
			ThirdPartyAuthorization thirdPartyAuthorization) {
		this. = thirdPartyAuthorization;
	}
		String payLoad = null;
			payLoad = tokenAuthPayLoad();
else if ( instanceof SubjectAuthorization) {
			payLoad = authPayLoad(credential,
else {
			payLoad = authPayLoad(credentialnull);
		}
		return payLoad;
	}

Returns a empty soap header String, token authorization does not bear a credential part

Returns:
	private String tokenAuthPayLoad() {
		StringBuilder soapMsg = new StringBuilder();
		soapMsg.append("<ns:RequesterCredentials/>");
		return soapMsg.toString();
	}
			SubjectAuthorization subjectAuth) {
		StringBuilder soapMsg = new StringBuilder();
		soapMsg.append("<ns:RequesterCredentials>");
		soapMsg.append("<ebl:Credentials>");
		soapMsg.append("<ebl:Username>" + credential.getUserName()
"</ebl:Username>");
		soapMsg.append("<ebl:Password>" + credential.getPassword()
"</ebl:Password>");
		// Append subject credential if available
		if (subjectAuth != null) {
			soapMsg.append("<ebl:Subject>" + subjectAuth.getSubject()
"</ebl:Subject>");
		}
		soapMsg.append("</ebl:Credentials>");
		soapMsg.append("</ns:RequesterCredentials>");
		return soapMsg.toString();
	}
New to GrepCode? Check out our FAQ X