}
requestContext.setServiceProviderPublicKey(providerPublicKey);
// process the claims if needed.
if (request.getClaims() != null) {
ClaimsType claims = request.getClaims();
ClaimsProcessor processor = this.configuration.getClaimsProcessor(claims.getDialect());
// if there is a processor, process the claims and set the resulting attributes in the context.
if (processor != null)
requestContext.setClaimedAttributes(processor.processClaims(claims, callerPrincipal));
else if (logger.isDebugEnabled())
logger.debug("Claims have been specified in the request but no processor was found for dialect " + claims.getDialect());
}
// get the OnBehalfOf principal, if one has been specified.
if (request.getOnBehalfOf() != null) {
Principal onBehalfOfPrincipal = WSTrustUtil.getOnBehalfOfPrincipal(request.getOnBehalfOf());