SecurityToken securityToken = this.decryptSecurityToken(encryptedSecurityToken);
//Make sure the person is authorized to refresh this token
String userId = String.valueOf(userService.getAuthenticatedUser().getEntityId());
if (!securityToken.getViewerId().equalsIgnoreCase(userId)) {
throw new SecurityTokenException("Illegal attempt by user " + userId +
" to refresh security token with a viewerId of " + securityToken.getViewerId());
}
//Create a new RegionWidget instance from it so we can use it to generate a new encrypted token
RegionWidget regionWidget = new RegionWidget(securityToken.getModuleId(),