Octavi00 commented on code in PR #11812:
URL: https://github.com/apache/gravitino/pull/11812#discussion_r3600471700


##########
web-v2/web/src/lib/store/auth/index.js:
##########
@@ -98,6 +98,36 @@ export const loginAction = 
createAsyncThunk('auth/loginAction', async ({ params,
   return { token: access_token, expired: expires_in }
 })
 
+export const basicLoginAction = createAsyncThunk(
+  'auth/basicLoginAction',
+  async ({ username, password, router }, { dispatch }) => {
+    const basicToken = `Basic ${btoa(`${username}:${password}`)}`
+
+    const [err, res] = await to(basicLoginApi(basicToken))

Review Comment:
   @LauraXia123 I have started working on a test file, but I wanted to ask if I 
was dropping it in the right spot? Basically oidc test file was placed right in 
the provider folder alongside it, but since basicLoginAction is simply a 
function, would it make sense to write a index.test.js file in the store/auth 
folder? I get that the loginAction doesn't particularly need a test file 
because it's handled by the oidc provider test, but what about the simple auth 
case? Would that also need a test?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to