[ARVADOS-WORKBENCH2] updated: 1.4.1-305-gc217a294

Git user git at public.arvados.org
Wed Apr 1 16:11:37 UTC 2020


Summary of changes:
 src/views-components/login-form/login-form.tsx |  2 +-
 src/views/login-panel/login-panel.tsx          | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

       via  c217a294d9f4ce79bb8140dba54ad2ed22961bab (commit)
      from  c791a7ebad9264d5ef3be948ad038ef83b7da64d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c217a294d9f4ce79bb8140dba54ad2ed22961bab
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Wed Apr 1 13:10:55 2020 -0300

    16212: Updates form POST to use new 'users/authenticate' endpoint.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/src/views-components/login-form/login-form.tsx b/src/views-components/login-form/login-form.tsx
index 8ec856f9..160a1bb8 100644
--- a/src/views-components/login-form/login-form.tsx
+++ b/src/views-components/login-form/login-form.tsx
@@ -85,7 +85,7 @@ export const LoginForm = withStyles(styles)(
             handleSubmit(username, password)
             .then((response) => {
                 setSubmitting(false);
-                const apiToken = response.data.token;
+                const apiToken = response.data.api_token;
                 if (apiToken) {
                     dispatch<any>(saveApiToken(apiToken)).finally(
                         () => dispatch(navigateToRootProject));
diff --git a/src/views/login-panel/login-panel.tsx b/src/views/login-panel/login-panel.tsx
index ce8adb8f..25fee7eb 100644
--- a/src/views/login-panel/login-panel.tsx
+++ b/src/views/login-panel/login-panel.tsx
@@ -50,11 +50,13 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
 });
 
 const doPAMLogin = (url: string) => (username: string, password: string) => {
-    const formData = new FormData();
-    formData.append("username", username);
-    formData.append("password", password);
-    return Axios.post(`${url}/login`, formData, {
-        headers: { 'X-Http-Method-Override': 'GET' },
+    const formData = [];
+    formData.push('username='+encodeURIComponent(username));
+    formData.push('password='+encodeURIComponent(password));
+    return Axios.post(`${url}/arvados/v1/users/authenticate`, formData.join('&'), {
+        headers: {
+            'Content-Type': 'application/x-www-form-urlencoded'
+        },
     });
 };
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list