Package edu.stanford.bmir.protege.web.client.ui.openid

Examples of edu.stanford.bmir.protege.web.client.ui.openid.OpenIdUtil


        }

        @Override
        public void handleSuccess(OpenIdData openIdData) {
            OpenIdUtil opIdUtil = new OpenIdUtil();
            opIdUtil.displayUsersOpenIdList(openIdData, editProfTable, win, false, win.getHeight());

        }
View Full Code Here


        newUserTable.setWidget(5, 1, confirmPassword);

        confirmPassword.addKeyDownHandler(new KeyDownHandler() {
            public void onKeyDown(KeyDownEvent event) {
                if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                    OpenIdUtil openIdUtil = new OpenIdUtil();
                    if (newUserID.getText().trim().equals("") || newUserPassword.getText().trim().equals("") || confirmPassword.getText().trim().equals("")) {
                        MessageBox.alert("Please enter both a user name and a password.");
                    }
                    else if (isLoginWithHttps) {
                        openIdUtil.createNewUserToAssociateOpenIdWithHttps(newUserID.getText().trim(), newUserPassword, confirmPassword, newUserEmailID.getText().trim(), win);
                    }
                    else {
                        openIdUtil.createNewUserToAssocOpenIdWithEncryption(newUserID.getText().trim(), newUserPassword, confirmPassword, newUserEmailID.getText().trim(), win);
                    }
                }
            }
        });

        Button register = new Button("Register", new ButtonListenerAdapter() {
            @Override
            public void onClick(Button button, EventObject e) {
                OpenIdUtil openIdUtil = new OpenIdUtil();
                if (newUserID.getText().trim().equals("") || newUserPassword.getText().trim().equals("") || confirmPassword.getText().trim().equals("")) {
                    MessageBox.alert("Please enter both a user name and a password.");
                }
                else if (isLoginWithHttps) {
                    openIdUtil.createNewUserToAssociateOpenIdWithHttps(newUserID.getText().trim(), newUserPassword, confirmPassword, newUserEmailID.getText().trim(), win);
                }
                else {
                    openIdUtil.createNewUserToAssocOpenIdWithEncryption(newUserID.getText().trim(), newUserPassword, confirmPassword, newUserEmailID.getText().trim(), win);
                }
            }
        });

        Button cancel = new Button("Cancel", new ButtonListenerAdapter() {
View Full Code Here

    private void associateCurrentWebProtegeAccount() {
        final String httsPort = Application.get().getClientApplicationProperty(WebProtegePropertyName.HTTPS_PORT).orNull();
        OpenIdServiceManager.getInstance().clearAuthUserToAssocOpenIdSessData(new AsyncCallback<Void>() {

            public void onSuccess(Void result) {
                OpenIdUtil openIdUtil = new OpenIdUtil();
                openIdUtil.getTimeoutAndCheckIfAuthenToAssocId();
                LoginUtil loginUtil = new LoginUtil();
                String authUrl = loginUtil.getAuthenticateWindowUrl(AuthenticationConstants.AUTHEN_TYPE_LOGIN_TO_ASSOC_OPEN_ID, httsPort);

                loginUtil.openNewWindow(authUrl, "375", "220", "0");
View Full Code Here

    private void createAndAssociateWebProtegeAccount() {
        final String httsPort = Application.get().getClientApplicationProperty(WebProtegePropertyName.HTTPS_PORT).orNull();
        OpenIdServiceManager.getInstance().clearCreateUserToAssocOpenIdSessData(new AsyncCallback<Void>() {

            public void onSuccess(Void result) {
                OpenIdUtil openIdUtil = new OpenIdUtil();
                openIdUtil.getTimeoutAndCheckIfUserCreatedToAssocId();
                LoginUtil loginUtil = new LoginUtil();
                String authUrl = loginUtil.getAuthenticateWindowUrl(AuthenticationConstants.AUTHEN_TYPE_CREATE_USER_TO_ASSOC_OPEN_ID, httsPort);

                loginUtil.openNewWindow(authUrl, "440", "260", "0");
View Full Code Here

        });
    }

    private void callSignAndAssocOpenId(final Boolean isLoginWithHttps, final Window win, final TextBox userNameField, final TextBox passwordField) {
        win.getEl().mask("Signing in...");
        OpenIdUtil openIdUtil = new OpenIdUtil();
        if (userNameField.getText().trim().equals("")) {
            win.getEl().unmask();
            MessageBox.alert("Please enter a user name.");
        }
        else if (isLoginWithHttps) {
            openIdUtil.signInToAssocOpenIdWithHttps(userNameField.getText().trim(), passwordField, win);
        }
        else {
            openIdUtil.signInToAssocOpenIdWithEncryption(userNameField.getText().trim(), passwordField, win);
        }
    }
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.client.ui.openid.OpenIdUtil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.