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({
|
auth({
|
||||||
required: false,
|
required: false,
|
||||||
}),
|
}),
|
||||||
|
plugin.middleware,
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
async (context) => {
|
async (context) => {
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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: {
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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: {
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ export default (plugin: PluginType) => {
|
||||||
required: [RolePermissions.OAuth],
|
required: [RolePermissions.OAuth],
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
plugin.middleware,
|
||||||
],
|
],
|
||||||
request: {
|
request: {
|
||||||
body: {
|
body: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue