2021-05-05 05:06:05 +07:00
|
|
|
package handlers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
2022-03-16 05:55:38 +07:00
|
|
|
"github.com/ory/fosite"
|
|
|
|
|
2021-08-11 08:04:35 +07:00
|
|
|
"github.com/authelia/authelia/v4/internal/middlewares"
|
2021-05-05 05:06:05 +07:00
|
|
|
)
|
|
|
|
|
2021-08-10 07:31:08 +07:00
|
|
|
func oidcRevocation(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter, req *http.Request) {
|
2022-03-16 05:55:38 +07:00
|
|
|
var err error
|
|
|
|
|
|
|
|
if err = ctx.Providers.OpenIDConnect.Fosite.NewRevocationRequest(ctx, req); err != nil {
|
|
|
|
rfc := fosite.ErrorToRFC6749Error(err)
|
|
|
|
|
|
|
|
ctx.Logger.Errorf("Revocation Request failed with error: %+v", rfc)
|
|
|
|
}
|
2021-05-05 05:06:05 +07:00
|
|
|
|
|
|
|
ctx.Providers.OpenIDConnect.Fosite.WriteRevocationResponse(rw, err)
|
|
|
|
}
|