@@ -20,12 +20,35 @@ class ProxyHost extends Model {
20
20
this . domain_names = [ ] ;
21
21
}
22
22
23
+ // Default for openidc_allowed_users
24
+ if ( typeof this . openidc_allowed_users === 'undefined' ) {
25
+ this . openidc_allowed_users = [ ] ;
26
+ }
27
+
23
28
// Default for meta
24
29
if ( typeof this . meta === 'undefined' ) {
25
30
this . meta = { } ;
26
31
}
27
32
33
+ // Openidc defaults
34
+ if ( typeof this . openidc_auth_method === 'undefined' ) {
35
+ this . openidc_auth_method = 'client_secret_post' ;
36
+ }
37
+ if ( typeof this . openidc_redirect_uri === 'undefined' ) {
38
+ this . openidc_redirect_uri = '' ;
39
+ }
40
+ if ( typeof this . openidc_discovery === 'undefined' ) {
41
+ this . openidc_discovery = '' ;
42
+ }
43
+ if ( typeof this . openidc_client_id === 'undefined' ) {
44
+ this . openidc_client_id = '' ;
45
+ }
46
+ if ( typeof this . openidc_client_secret === 'undefined' ) {
47
+ this . openidc_client_secret = '' ;
48
+ }
49
+
28
50
this . domain_names . sort ( ) ;
51
+ this . openidc_allowed_users . sort ( ) ;
29
52
}
30
53
31
54
$beforeUpdate ( ) {
@@ -35,6 +58,11 @@ class ProxyHost extends Model {
35
58
if ( typeof this . domain_names !== 'undefined' ) {
36
59
this . domain_names . sort ( ) ;
37
60
}
61
+
62
+ // Sort openidc_allowed_users
63
+ if ( typeof this . openidc_allowed_users !== 'undefined' ) {
64
+ this . openidc_allowed_users . sort ( ) ;
65
+ }
38
66
}
39
67
40
68
static get name ( ) {
@@ -46,7 +74,7 @@ class ProxyHost extends Model {
46
74
}
47
75
48
76
static get jsonAttributes ( ) {
49
- return [ 'domain_names' , 'meta' , 'locations' ] ;
77
+ return [ 'domain_names' , 'meta' , 'locations' , 'openidc_allowed_users' ] ;
50
78
}
51
79
52
80
static get relationMappings ( ) {
@@ -91,4 +119,4 @@ class ProxyHost extends Model {
91
119
}
92
120
}
93
121
94
- module . exports = ProxyHost ;
122
+ module . exports = ProxyHost ;
0 commit comments