Trump's executive order on immigration uses exactly the same legal authority used by Obama a few weeks ago regarding immigration and entry into the US  from UN-sanctioned people and countries like Russia.  It is also the legal authority for denying entry for Iran atomic bomb makers Obama used.  

The same legal authority used by Carter to keep Iranians out when he was President.

Either the law is constitutional or it is not; who invokes it is irrelevant.  

" Whenever the President finds that the entry of any aliens or of any class of aliens into the United States would be detrimental to the interests of the United States, he may by proclamation, and for such period as he shall deem necessary, suspend the entry of all aliens or any class of aliens as immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate."

18 USC Section 1182