nolint:revive
(t testing.TB)
| 34 | |
| 35 | //nolint:revive |
| 36 | func makeScimUser(t testing.TB) coderd.SCIMUser { |
| 37 | rstr, err := cryptorand.String(10) |
| 38 | require.NoError(t, err) |
| 39 | |
| 40 | return coderd.SCIMUser{ |
| 41 | UserName: rstr, |
| 42 | Name: struct { |
| 43 | GivenName string `json:"givenName"` |
| 44 | FamilyName string `json:"familyName"` |
| 45 | }{ |
| 46 | GivenName: rstr, |
| 47 | FamilyName: rstr, |
| 48 | }, |
| 49 | Emails: []struct { |
| 50 | Primary bool `json:"primary"` |
| 51 | Value string `json:"value" format:"email"` |
| 52 | Type string `json:"type"` |
| 53 | Display string `json:"display"` |
| 54 | }{ |
| 55 | {Primary: true, Value: fmt.Sprintf("%s@coder.com", rstr)}, |
| 56 | }, |
| 57 | Active: ptr.Ref(true), |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | func setScimAuth(key []byte) func(*http.Request) { |
| 62 | return func(r *http.Request) { |