Had the legislation not passed, Maine risked having its licenses rejected as valid identification at airports and federal buildings.