Traefik / auth代理到CAS服务器

I am trying to use Traefik's forward authentication for SSO my docker applications. Indeed we already have a CAS server in company and the idea would be to reuse it. I understand that I can not directly point Traefic to the CAS server (the redirect to login is considered as an answer, other than 2XX login failed). I can write a small proxy in Golang for example to forward the request to CAS, a bit like here

My question is whether or not it is possible? If yes a flow schema would be welcome and any other help to realize the project.