How to implement my own TokenExchangeProvider

Hello,
I am new to extending the Keycloak.
I am wondering, if it is possible to implement an own TokenExchangeProvider on an custom endpoint or extend the DefaultTokenExchangeProvider?
The extension should return a valid accesstoken.