Eleks Software interview question

How would you secure REST API endpoint?