Get token oauth inside a SPI algorithm

Hi , I can get token correctly using endpoint auth/realms/pec-dev/protocol/openid-connect/token

How can I get it programmatically in a SPI algorithm?