|
51 | 51 | saveToConfig('Plugins.Topcoder.SSO.Auth0Domain', getenv('TOPCODER_PLUGIN_SSO_AUTH0DOMAIN')); |
52 | 52 | saveToConfig('Plugins.Topcoder.SSO.AuthorizationURI', '/v3/authorizations/1'); |
53 | 53 | saveToConfig('Plugins.Topcoder.SSO.CookieName', 'v3jwt',false); |
54 | | - saveToConfig('Plugins.Topcoder.SSO.TopcoderRS256.ID', getenv('TOPCODER_PLUGIN_SSO_TOPCODER_RS256_ID'), 'BXWXUWnilVUPdN01t2Se29Tw2ZYNGZvH'); |
55 | | - saveToConfig('Plugins.Topcoder.SSO.TopcoderHS256.ID', getenv('TOPCODER_PLUGIN_SSO_TOPCODER_HS256_ID'), 'JFDo7HMkf0q2CkVFHojy3zHWafziprhT'); |
| 54 | + saveToConfig('Plugins.Topcoder.SSO.TopcoderRS256.ID', getenv('TOPCODER_PLUGIN_SSO_TOPCODER_RS256_ID'), false); |
| 55 | + saveToConfig('Plugins.Topcoder.SSO.TopcoderHS256.ID', getenv('TOPCODER_PLUGIN_SSO_TOPCODER_HS256_ID'), false); |
| 56 | + |
56 | 57 | saveToConfig('Plugins.Topcoder.SSO.TopcoderHS256.Secret', getenv('TOPCODER_HS256_SECRET') ); |
57 | 58 | saveToConfig('Plugins.Topcoder.SSO.TopcoderRS256.UsernameClaim', 'nickname',false); |
58 | 59 | saveToConfig('Plugins.Topcoder.SSO.TopcoderHS256.UsernameClaim', 'handle',false); |
|
96 | 97 | saveToConfig('Recaptcha.PublicKey', getenv('RECAPTCHA_PLUGIN_PUBLIC_KEY'), false); |
97 | 98 | } |
98 | 99 |
|
99 | | - |
100 | | - // Fix: OAuth 2 SSO should be inactive and not by default. It should be removed later. |
101 | | - if ($SQL->getWhere('UserAuthenticationProvider', ['AuthenticationKey' => 'oauth2'])->numRows() > 0) { |
102 | | - $SQL->update('UserAuthenticationProvider') |
103 | | - ->set('Active', 0) |
104 | | - ->set('IsDefault',0) |
105 | | - ->where('AuthenticationKey' , 'oauth2')->put(); |
106 | | - } |
107 | | - |
108 | | - // Add Topcoder User Authentication Provider. |
109 | | - // SignInUrl/SignOutUrl should be set in Topcoder plugin's setup; otherwise they couldn't be updated in DB |
110 | | - if ($SQL->getWhere('UserAuthenticationProvider', ['AuthenticationKey' => 'topcoder'])->numRows() == 0) { |
111 | | - $SQL->insert('UserAuthenticationProvider', [ |
112 | | - 'AuthenticationKey' => 'topcoder', |
113 | | - 'AuthenticationSchemeAlias' => 'topcoder', |
114 | | - 'Name' => 'topcoder', |
115 | | - 'Active' => 1, |
116 | | - 'IsDefault' => 1 |
117 | | - ]); |
118 | | - } |
119 | | - |
120 | 100 | // Fix: Add the 'topcoder' role type in Role Table. It should be removed after upgrading existing DB. |
121 | 101 | // The Topcoder plugin's setup method will upgrade DB during Vanilla installation |
122 | 102 | $SQL->query('alter table GDN_Role modify Type enum(\'topcoder\', \'guest\', \'unconfirmed\', \'applicant\', \'member\', \'moderator\', \'administrator\')'); |
|
0 commit comments