private void validateSecurityContextTokenId(String expectedSctId, Packet packet) throws RmSecurityException {
String actualSctId = validator.getSecurityContextTokenId(packet);
boolean isValid = (expectedSctId != null) ? expectedSctId.equals(actualSctId) : actualSctId == null;
if (!isValid) {
throw new RmSecurityException(LocalizationMessages.WSRM_1131_SECURITY_TOKEN_AUTHORIZATION_ERROR(actualSctId, expectedSctId));
}
}