Factorize endpoint retrieval in access

Change-Id: Iaace7020696b238e7829dbcae60f0bc7c74a79e4
Signed-off-by: Julien Danjou <julien@danjou.info>
Merge "Factorize endpoint retrieval in access"