New legislation in the Republic of Ireland will compel suspects to give police their details.