Creates token and challenge by some attributes.