(user, password string)
| 166 | } |
| 167 | |
| 168 | func (hc *HTTPClient) LoginIntoNamespaceV20(user, password string) error { |
| 169 | q := `mutation login($userId: String, $password: String) { |
| 170 | login(userId: $userId, password: $password) { |
| 171 | response { |
| 172 | accessJWT |
| 173 | refreshJWT |
| 174 | } |
| 175 | } |
| 176 | }` |
| 177 | params := GraphQLParams{ |
| 178 | Query: q, |
| 179 | Variables: map[string]interface{}{ |
| 180 | "userId": user, |
| 181 | "password": password, |
| 182 | }, |
| 183 | } |
| 184 | |
| 185 | hc.HttpToken = &HttpToken{ |
| 186 | UserId: user, |
| 187 | Password: password, |
| 188 | } |
| 189 | return hc.doLogin(params, true) |
| 190 | } |
| 191 | |
| 192 | func (hc *HTTPClient) doLogin(params GraphQLParams, isAdmin bool) error { |
| 193 | resp, err := hc.RunGraphqlQuery(params, isAdmin) |
no test coverage detected