mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(plugin): 🐛 Add missing plugin middleware to some OIDC plugin routes
This commit is contained in:
parent
d2dcdce763
commit
a265e9df41
|
|
@ -36,6 +36,7 @@ export default (plugin: PluginType) => {
|
|||
auth({
|
||||
required: false,
|
||||
}),
|
||||
plugin.middleware,
|
||||
],
|
||||
}),
|
||||
async (context) => {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ export default (plugin: PluginType) => {
|
|||
summary: "SSO callback",
|
||||
description:
|
||||
"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: {
|
||||
query: schemas.query,
|
||||
params: schemas.param,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default (plugin: PluginType) => {
|
|||
method: "post",
|
||||
path: "/oauth/revoke",
|
||||
summary: "Revoke token",
|
||||
middleware: [jsonOrForm()],
|
||||
middleware: [jsonOrForm(), plugin.middleware],
|
||||
request: {
|
||||
body: {
|
||||
content: {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ export default (plugin: PluginType) => {
|
|||
request: {
|
||||
query: schemas.query,
|
||||
},
|
||||
middleware: [plugin.middleware],
|
||||
responses: {
|
||||
302: {
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export default (plugin: PluginType) => {
|
|||
method: "post",
|
||||
path: "/oauth/token",
|
||||
summary: "Get token",
|
||||
middleware: [jsonOrForm()],
|
||||
middleware: [jsonOrForm(), plugin.middleware],
|
||||
request: {
|
||||
body: {
|
||||
content: {
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ export default (plugin: PluginType) => {
|
|||
required: [RolePermissions.OAuth],
|
||||
},
|
||||
),
|
||||
plugin.middleware,
|
||||
],
|
||||
request: {
|
||||
body: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue