@@ -88,6 +88,8 @@ func TestAddOauth(t *testing.T) {
88
88
"--restricted-group" , "restricted" ,
89
89
"--group-team-map" , `{"group1": [1,2]}` ,
90
90
"--group-team-map-removal=true" ,
91
+ "--ssh-public-key-claim-name" , "attr_ssh_pub_key" ,
92
+ "--full-name-claim-name" , "attr_full_name" ,
91
93
},
92
94
source : & auth_model.Source {
93
95
Type : auth_model .OAuth2 ,
@@ -104,15 +106,17 @@ func TestAddOauth(t *testing.T) {
104
106
EmailURL : "https://example.com/email" ,
105
107
Tenant : "some_tenant" ,
106
108
},
107
- IconURL : "https://example.com/icon" ,
108
- Scopes : []string {"scope1" , "scope2" },
109
- RequiredClaimName : "claim_name" ,
110
- RequiredClaimValue : "claim_value" ,
111
- GroupClaimName : "group_name" ,
112
- AdminGroup : "admin" ,
113
- RestrictedGroup : "restricted" ,
114
- GroupTeamMap : `{"group1": [1,2]}` ,
115
- GroupTeamMapRemoval : true ,
109
+ IconURL : "https://example.com/icon" ,
110
+ Scopes : []string {"scope1" , "scope2" },
111
+ RequiredClaimName : "claim_name" ,
112
+ RequiredClaimValue : "claim_value" ,
113
+ GroupClaimName : "group_name" ,
114
+ AdminGroup : "admin" ,
115
+ RestrictedGroup : "restricted" ,
116
+ GroupTeamMap : `{"group1": [1,2]}` ,
117
+ GroupTeamMapRemoval : true ,
118
+ SSHPublicKeyClaimName : "attr_ssh_pub_key" ,
119
+ FullNameClaimName : "attr_full_name" ,
116
120
},
117
121
TwoFactorPolicy : "skip" ,
118
122
},
@@ -223,15 +227,17 @@ func TestUpdateOauth(t *testing.T) {
223
227
EmailURL : "https://old.example.com/email" ,
224
228
Tenant : "old_tenant" ,
225
229
},
226
- IconURL : "https://old.example.com/icon" ,
227
- Scopes : []string {"old_scope1" , "old_scope2" },
228
- RequiredClaimName : "old_claim_name" ,
229
- RequiredClaimValue : "old_claim_value" ,
230
- GroupClaimName : "old_group_name" ,
231
- AdminGroup : "old_admin" ,
232
- RestrictedGroup : "old_restricted" ,
233
- GroupTeamMap : `{"old_group1": [1,2]}` ,
234
- GroupTeamMapRemoval : true ,
230
+ IconURL : "https://old.example.com/icon" ,
231
+ Scopes : []string {"old_scope1" , "old_scope2" },
232
+ RequiredClaimName : "old_claim_name" ,
233
+ RequiredClaimValue : "old_claim_value" ,
234
+ GroupClaimName : "old_group_name" ,
235
+ AdminGroup : "old_admin" ,
236
+ RestrictedGroup : "old_restricted" ,
237
+ GroupTeamMap : `{"old_group1": [1,2]}` ,
238
+ GroupTeamMapRemoval : true ,
239
+ SSHPublicKeyClaimName : "old_ssh_pub_key" ,
240
+ FullNameClaimName : "old_full_name" ,
235
241
},
236
242
TwoFactorPolicy : "" ,
237
243
},
@@ -257,6 +263,8 @@ func TestUpdateOauth(t *testing.T) {
257
263
"--restricted-group" , "restricted" ,
258
264
"--group-team-map" , `{"group1": [1,2]}` ,
259
265
"--group-team-map-removal=false" ,
266
+ "--ssh-public-key-claim-name" , "new_ssh_pub_key" ,
267
+ "--full-name-claim-name" , "new_full_name" ,
260
268
},
261
269
authSource : & auth_model.Source {
262
270
ID : 1 ,
@@ -274,15 +282,17 @@ func TestUpdateOauth(t *testing.T) {
274
282
EmailURL : "https://example.com/email" ,
275
283
Tenant : "new_tenant" ,
276
284
},
277
- IconURL : "https://example.com/icon" ,
278
- Scopes : []string {"scope1" , "scope2" },
279
- RequiredClaimName : "claim_name" ,
280
- RequiredClaimValue : "claim_value" ,
281
- GroupClaimName : "group_name" ,
282
- AdminGroup : "admin" ,
283
- RestrictedGroup : "restricted" ,
284
- GroupTeamMap : `{"group1": [1,2]}` ,
285
- GroupTeamMapRemoval : false ,
285
+ IconURL : "https://example.com/icon" ,
286
+ Scopes : []string {"scope1" , "scope2" },
287
+ RequiredClaimName : "claim_name" ,
288
+ RequiredClaimValue : "claim_value" ,
289
+ GroupClaimName : "group_name" ,
290
+ AdminGroup : "admin" ,
291
+ RestrictedGroup : "restricted" ,
292
+ GroupTeamMap : `{"group1": [1,2]}` ,
293
+ GroupTeamMapRemoval : false ,
294
+ SSHPublicKeyClaimName : "new_ssh_pub_key" ,
295
+ FullNameClaimName : "new_full_name" ,
286
296
},
287
297
TwoFactorPolicy : "skip" ,
288
298
},
0 commit comments