Login just helps by making an unauthenticated client and logging in with the given claims. All Logins should be unauthenticated, so this is a convenience method.
(t *testing.T, idTokenClaims jwt.MapClaims)
| 44 | // the given claims. All Logins should be unauthenticated, so this is a |
| 45 | // convenience method. |
| 46 | func (h *LoginHelper) Login(t *testing.T, idTokenClaims jwt.MapClaims) (*codersdk.Client, *http.Response) { |
| 47 | t.Helper() |
| 48 | unauthenticatedClient := codersdk.New(h.client.URL) |
| 49 | |
| 50 | return h.fake.Login(t, unauthenticatedClient, idTokenClaims) |
| 51 | } |
| 52 | |
| 53 | // AttemptLogin does not assert a successful login. |
| 54 | func (h *LoginHelper) AttemptLogin(t *testing.T, idTokenClaims jwt.MapClaims) (*codersdk.Client, *http.Response) { |