sou 7 лет назад
Родитель
Сommit
62bc24f276

+ 1 - 1
lib/form/admin/securityPassportGitHub.js

@@ -8,6 +8,6 @@ module.exports = form(
   field('settingForm[security:passport-github:isEnabled]').trim().toBooleanStrict().required(),
   field('settingForm[security:passport-github:isEnabled]').trim().toBooleanStrict().required(),
   field('settingForm[security:passport-github:clientId]').trim(),
   field('settingForm[security:passport-github:clientId]').trim(),
   field('settingForm[security:passport-github:clientSecret]').trim(),
   field('settingForm[security:passport-github:clientSecret]').trim(),
-  field('settingForm[security:passport-github:callbackURL]').trim(),
+  field('settingForm[security:passport-github:callbackUrl]').trim(),
   field('settingForm[security:passport-github:isSameUsernameTreatedAsIdenticalUser]').trim().toBooleanStrict(),
   field('settingForm[security:passport-github:isSameUsernameTreatedAsIdenticalUser]').trim().toBooleanStrict(),
 );
 );

+ 1 - 1
lib/form/admin/securityPassportGoogle.js

@@ -8,6 +8,6 @@ module.exports = form(
   field('settingForm[security:passport-google:isEnabled]').trim().toBooleanStrict().required(),
   field('settingForm[security:passport-google:isEnabled]').trim().toBooleanStrict().required(),
   field('settingForm[security:passport-google:clientId]').trim(),
   field('settingForm[security:passport-google:clientId]').trim(),
   field('settingForm[security:passport-google:clientSecret]').trim(),
   field('settingForm[security:passport-google:clientSecret]').trim(),
-  field('settingForm[security:passport-google:callbackURL]').trim(),
+  field('settingForm[security:passport-google:callbackUrl]').trim(),
   field('settingForm[security:passport-google:isSameUsernameTreatedAsIdenticalUser]').trim().toBooleanStrict(),
   field('settingForm[security:passport-google:isSameUsernameTreatedAsIdenticalUser]').trim().toBooleanStrict(),
 );
 );

+ 2 - 2
lib/service/passport.js

@@ -267,7 +267,7 @@ class PassportService {
     passport.use(new GoogleStrategy({
     passport.use(new GoogleStrategy({
       clientId: config.crowi['security:passport-google:clientId'] || process.env.OAUTH_GOOGLE_CLIENT_SECRET,
       clientId: config.crowi['security:passport-google:clientId'] || process.env.OAUTH_GOOGLE_CLIENT_SECRET,
       clientSecret: config.crowi['security:passport-google:clientSecret'] || process.env.OAUTH_GOOGLE_CLIENT_SECRET,
       clientSecret: config.crowi['security:passport-google:clientSecret'] || process.env.OAUTH_GOOGLE_CLIENT_SECRET,
-      callbackURL: config.crowi['security:passport-google:callbackURL'] || process.env.OAUTH_GOOGLE_CALLBACK_URL,
+      callbackURL: config.crowi['security:passport-google:callbackUrl'] || process.env.OAUTH_GOOGLE_CALLBACK_URL,
       skipUserProfile: false,
       skipUserProfile: false,
     }, function(accessToken, refreshToken, profile, done) {
     }, function(accessToken, refreshToken, profile, done) {
       if (profile) {
       if (profile) {
@@ -313,7 +313,7 @@ class PassportService {
     passport.use(new GitHubStrategy({
     passport.use(new GitHubStrategy({
       clientID: config.crowi['security:passport-github:clientId'] || process.env.OAUTH_GITHUB_CLIENT_ID,
       clientID: config.crowi['security:passport-github:clientId'] || process.env.OAUTH_GITHUB_CLIENT_ID,
       clientSecret: config.crowi['security:passport-github:clientSecret'] || process.env.OAUTH_GITHUB_CLIENT_SECRET,
       clientSecret: config.crowi['security:passport-github:clientSecret'] || process.env.OAUTH_GITHUB_CLIENT_SECRET,
-      callbackURL: config.crowi['security:passport-github:callbackURL'] || process.env.OAUTH_GITHUB_CALLBACK_URL,
+      callbackURL: config.crowi['security:passport-github:callbackUrl'] || process.env.OAUTH_GITHUB_CALLBACK_URL,
       skipUserProfile: false,
       skipUserProfile: false,
     }, function(accessToken, refreshToken, profile, done) {
     }, function(accessToken, refreshToken, profile, done) {
       if (profile) {
       if (profile) {

+ 2 - 2
lib/views/admin/widget/passport/github.html

@@ -47,9 +47,9 @@
     </div>
     </div>
 
 
     <div class="form-group">
     <div class="form-group">
-      <label for="settingForm[security:passport-github:callbackURL]" class="col-xs-3 control-label">{{ t("security_setting.callback_URL") }}</label>
+      <label for="settingForm[security:passport-github:callbackUrl]" class="col-xs-3 control-label">{{ t("security_setting.callback_URL") }}</label>
       <div class="col-xs-6">
       <div class="col-xs-6">
-        <input class="form-control" type="text" name="settingForm[security:passport-github:callbackURL]" value="{{ settingForm['security:passport-github:callbackURL'] || '' }}">
+        <input class="form-control" type="text" name="settingForm[security:passport-github:callbackUrl]" value="{{ settingForm['security:passport-github:callbackUrl'] || '' }}">
         <p class="help-block">
         <p class="help-block">
           <small>
           <small>
             {{ t("security_setting.Use env var if empty", "OAUTH_GITHUB_CALLBACK_URL") }}
             {{ t("security_setting.Use env var if empty", "OAUTH_GITHUB_CALLBACK_URL") }}

+ 2 - 2
lib/views/admin/widget/passport/google-oauth.html

@@ -47,9 +47,9 @@
     </div>
     </div>
 
 
     <div class="form-group">
     <div class="form-group">
-      <label for="settingForm[security:passport-google:callbackURL]" class="col-xs-3 control-label">{{ t("security_setting.callback_URL") }}</label>
+      <label for="settingForm[security:passport-google:callbackUrl]" class="col-xs-3 control-label">{{ t("security_setting.callback_URL") }}</label>
       <div class="col-xs-6">
       <div class="col-xs-6">
-        <input class="form-control" type="text" name="settingForm[security:passport-google:callbackURL]" value="{{ settingForm['security:passport-google:callbackURL'] || '' }}">
+        <input class="form-control" type="text" name="settingForm[security:passport-google:callbackUrl]" value="{{ settingForm['security:passport-google:callbackUrl'] || '' }}">
         <p class="help-block">
         <p class="help-block">
           <small>
           <small>
             {{ t("security_setting.Use env var if empty", "OAUTH_GOOGLE_CALLBACK_URL") }}
             {{ t("security_setting.Use env var if empty", "OAUTH_GOOGLE_CALLBACK_URL") }}