@@ -88,6 +88,8 @@ func TestAddOauth(t *testing.T) {
8888 "--restricted-group" , "restricted" ,
8989 "--group-team-map" , `{"group1": [1,2]}` ,
9090 "--group-team-map-removal=true" ,
91+ "--ssh-public-key-claim-name" , "attr_ssh_pub_key" ,
92+ "--full-name-claim-name" , "attr_full_name" ,
9193 },
9294 source : & auth_model.Source {
9395 Type : auth_model .OAuth2 ,
@@ -104,15 +106,17 @@ func TestAddOauth(t *testing.T) {
104106 EmailURL : "https://example.com/email" ,
105107 Tenant : "some_tenant" ,
106108 },
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" ,
116120 },
117121 TwoFactorPolicy : "skip" ,
118122 },
@@ -223,15 +227,17 @@ func TestUpdateOauth(t *testing.T) {
223227 EmailURL : "https://old.example.com/email" ,
224228 Tenant : "old_tenant" ,
225229 },
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" ,
235241 },
236242 TwoFactorPolicy : "" ,
237243 },
@@ -257,6 +263,8 @@ func TestUpdateOauth(t *testing.T) {
257263 "--restricted-group" , "restricted" ,
258264 "--group-team-map" , `{"group1": [1,2]}` ,
259265 "--group-team-map-removal=false" ,
266+ "--ssh-public-key-claim-name" , "new_ssh_pub_key" ,
267+ "--full-name-claim-name" , "new_full_name" ,
260268 },
261269 authSource : & auth_model.Source {
262270 ID : 1 ,
@@ -274,15 +282,17 @@ func TestUpdateOauth(t *testing.T) {
274282 EmailURL : "https://example.com/email" ,
275283 Tenant : "new_tenant" ,
276284 },
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" ,
286296 },
287297 TwoFactorPolicy : "skip" ,
288298 },
0 commit comments