mirror of
https://github.com/plankanban/planka.git
synced 2025-07-22 22:59:44 +02:00
ref: Refactoring
This commit is contained in:
parent
743f2956c8
commit
40c04c35ff
23 changed files with 96 additions and 91 deletions
|
@ -1,20 +1,21 @@
|
|||
module.exports = {
|
||||
fn() {
|
||||
const oidcClient = sails.hooks.oidc.isActive() ? sails.hooks.oidc.getClient() : null;
|
||||
let oidc = null;
|
||||
if (sails.hooks.oidc.isActive()) {
|
||||
const oidcClient = sails.hooks.oidc.getClient();
|
||||
|
||||
oidc = {
|
||||
authorizationUrl: oidcClient.authorizationUrl({
|
||||
scope: sails.config.custom.oidcScopes,
|
||||
response_mode: 'fragment',
|
||||
}),
|
||||
endSessionUrl: oidcClient.issuer.end_session_endpoint ? oidcClient.endSessionUrl({}) : null,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
item: {
|
||||
oidc:
|
||||
sails.config.custom.oidcIssuer !== ''
|
||||
? {
|
||||
authorizationUrl: oidcClient.authorizationUrl({
|
||||
scope: sails.config.custom.oidcScopes,
|
||||
response_mode: 'fragment',
|
||||
}),
|
||||
endSessionUrl: oidcClient.issuer.end_session_endpoint
|
||||
? oidcClient.endSessionUrl({})
|
||||
: null,
|
||||
}
|
||||
: null,
|
||||
oidc,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue