diff --git a/filters/auth/oidc_introspection.go b/filters/auth/oidc_introspection.go index a32752a7c0..cdde259678 100644 --- a/filters/auth/oidc_introspection.go +++ b/filters/auth/oidc_introspection.go @@ -131,8 +131,13 @@ func (filter *oidcIntrospectionFilter) Request(ctx filters.FilterContext) { return } - sub := token.Claims["sub"].(string) - authorized(ctx, sub) + sub, ok := token.Claims["sub"] + if ok { + authorized(ctx, sub.(string)) + } else { + sub := token.Subject + authorized(ctx, sub) + } } func (filter *oidcIntrospectionFilter) Response(filters.FilterContext) {}