fix(plugin): 🐛 Add missing plugin middleware to some OIDC plugin routes

This commit is contained in:
Jesse Wierzbinski 2024-10-11 17:16:03 +02:00
parent d2dcdce763
commit a265e9df41
No known key found for this signature in database
6 changed files with 6 additions and 2 deletions

View file

@ -36,6 +36,7 @@ export default (plugin: PluginType) => {
auth({ auth({
required: false, required: false,
}), }),
plugin.middleware,
], ],
}), }),
async (context) => { async (context) => {

View file

@ -38,6 +38,7 @@ export default (plugin: PluginType) => {
summary: "SSO callback", summary: "SSO callback",
description: description:
"After the user has authenticated to an external OpenID provider, they are redirected here to complete the OAuth flow and get a code", "After the user has authenticated to an external OpenID provider, they are redirected here to complete the OAuth flow and get a code",
middleware: [plugin.middleware],
request: { request: {
query: schemas.query, query: schemas.query,
params: schemas.param, params: schemas.param,

View file

@ -20,7 +20,7 @@ export default (plugin: PluginType) => {
method: "post", method: "post",
path: "/oauth/revoke", path: "/oauth/revoke",
summary: "Revoke token", summary: "Revoke token",
middleware: [jsonOrForm()], middleware: [jsonOrForm(), plugin.middleware],
request: { request: {
body: { body: {
content: { content: {

View file

@ -30,6 +30,7 @@ export default (plugin: PluginType) => {
request: { request: {
query: schemas.query, query: schemas.query,
}, },
middleware: [plugin.middleware],
responses: { responses: {
302: { 302: {
description: description:

View file

@ -45,7 +45,7 @@ export default (plugin: PluginType) => {
method: "post", method: "post",
path: "/oauth/token", path: "/oauth/token",
summary: "Get token", summary: "Get token",
middleware: [jsonOrForm()], middleware: [jsonOrForm(), plugin.middleware],
request: { request: {
body: { body: {
content: { content: {

View file

@ -98,6 +98,7 @@ export default (plugin: PluginType) => {
required: [RolePermissions.OAuth], required: [RolePermissions.OAuth],
}, },
), ),
plugin.middleware,
], ],
request: { request: {
body: { body: {