I happen to have personal knowledge of this particular case.
(I I was in that airplane, too and sat 2, seated two rows away from him in the plane.
I'm I'm also a former pilot and was naturally very interested in what happened, so I asked him some questions during the flight back.)
He had worked as service mechanic for this company before, servicing their planes in Iceland. Their technical staff and the pilot of this plane already knew him, which made things easier.
Tools and parts wherewere available at the airport in Alicante, but no qualified technician certified for this type of aircraft.
The The technical staff of the airline contacted his boss in Iceland by phone, who agreed to sub-contract him to the airline for the duration of the repair and pay him overtime for the work.
They faxed a copy of his certification documents to Stockholm to cover the EASA regulations that require a certified professional doing the repair.