Rest api security example. It is done in two steps.