Juan Hernandez has posted comments on this change.

Change subject: webadmin: UI Plugins PoC, revision 7
......................................................................


Patch Set 2: (2 inline comments)

....................................................
File 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/utils/Base64Coder.java
Line 8:  *
Line 9:  * <p>
Line 10:  * Project home page: <a 
href="http://www.source-code.biz/base64coder/java/";>www.source-code.biz/base64coder/java</a><br>
Line 11:  * Author: Christian d'Heureuse, Inventec Informatik AG, Zurich, 
Switzerland<br>
Line 12:  * Multi-licensed: EPL / LGPL / GPL / AL / BSD / MIT.
Is this compatible with ASL? Instead of including this class I would try to 
avoid it.
Line 13:  */
Line 14: public class Base64Coder {
Line 15: 
Line 16:     // Mapping table from 6-bit nibbles to Base64 characters.


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/system/ApplicationInit.java
Line 93:         // Configure REST API integration for UI plugin infrastructure
Line 94:         Frontend.setLoginHandler(new FrontendLoginHandler() {
Line 95:             @Override
Line 96:             public void onLoginSuccess(String userName, String 
password, String domain) {
Line 97:                 
acquireRestApiSession(Base64Utils.getBasicAuthString(userName, password, 
domain));
Can't we use something like this?

  RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
  builder.setHeader("Prefer", "persistent-auth");
  builder.setUser(userName + "@" + domain);
  builder.setPassword(password);

GWT and the browser will translate that to the right authentication header, be 
it basic or whatever the server requires. In addition we woudn't need to 
include the Base64Utils class whose license is not very clear.

Saving this auth string in memory is not any safer than saving the password 
itself.
Line 98:             }
Line 99: 
Line 100:             @Override
Line 101:             public void onLogout() {


--
To view, visit http://gerrit.ovirt.org/9250
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6dd6e5b082264e8f8eee305e599f8ff3899e2fa4
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to