Chitosan, obtained from chitin, is chemically a polysaccharide and can also be called polyglucosamine. This substance is commercially available as a medical product or dietary supplement and is mainly used to support the treatment of obesity (Source).
The main sources of chitin, from which chitosan is made, are crabs and shellfish. People with allergies are therefore advised not to use this ingredient.
However, some mushrooms also contain chitosan. These include the so-called cultivated mushroom (Agaricus bisporus) and black mold (Aspergillus niger).