if (rst.getRequestType().toString().equals(wsTrustVer.getIssueRequestTypeURI())){
// ToDo
//final AppliesTo requestAppliesTo = rst.getAppliesTo();
//final AppliesTo responseAppliesTo = rstr.getAppliesTo();
final RequestedSecurityToken securityToken = rstr.getRequestedSecurityToken();
// Requested References
final RequestedAttachedReference attachedRef = rstr.getRequestedAttachedReference();
final RequestedUnattachedReference unattachedRef = rstr.getRequestedUnattachedReference();
// RequestedProofToken
final RequestedProofToken proofToken = rstr.getRequestedProofToken();
// Obtain the secret key for the context
final byte[] key = getKey(rstr, proofToken, rst);
if(key != null){
context.setProofKey(key);
}
//get the creation time and expires time and set it in the context
setLifetime(rstr, context);
if(securityToken == null && proofToken == null){
log.log(Level.SEVERE,
LogStringsMessages.WSSC_0002_NULL_TOKEN());
throw new WSSecureConversationException(LogStringsMessages.WSSC_0002_NULL_TOKEN());
}
if (securityToken != null){
context.setSecurityToken(securityToken.getToken());
}
if(attachedRef != null){
context.setAttachedSecurityTokenReference(attachedRef.getSTR());
}
if (unattachedRef != null){
context.setUnAttachedSecurityTokenReference(unattachedRef.getSTR());
}
}if (rst.getRequestType().toString().equals(wsTrustVer.getRenewRequestTypeURI())){
final RequestedSecurityToken securityToken = rstr.getRequestedSecurityToken();
// RequestedProofToken
final RequestedProofToken proofToken = rstr.getRequestedProofToken();
// Obtain the secret key for the context
final byte[] key = getKey(rstr, proofToken, rst);
//get the creation time and expires time and set it in the context
setLifetime(rstr, context);
if (securityToken != null){
context.setSecurityToken(securityToken.getToken());
}
SecurityContextTokenInfo sctInfo = null;
if(context.getSecurityContextTokenInfo() == null){
sctInfo = new SecurityContextTokenInfoImpl();
}else{