Package org.zanata.model.security

Examples of org.zanata.model.security.HCredentials


        if (isExternalLogin() && !isNewUser() && isAccountEnabledAndActivated()) {
            applyAuthentication();
        }
        // Get the authenticated account and credentials
        HAccount authenticatedAccount = null;
        HCredentials authenticatedCredentials = null;

        String username = credentials.getUsername();

        if (authType == AuthenticationType.OPENID) {
            authenticatedCredentials =
                    credentialsDAO.findByUser(zanataOpenId.getAuthResult()
                            .getAuthenticatedId());
            // on first Open Id login, there might not be any stored credentials
            if (authenticatedCredentials != null) {
                authenticatedAccount = authenticatedCredentials.getAccount();
            }
        } else {
            authenticatedCredentials = credentialsDAO.findByUser(username);
            authenticatedAccount = accountDAO.getByUsername(username);
        }
View Full Code Here


        HAccount account = new HAccount();
        account.setUsername("fedora-user");
        account.setEnabled(true);
        HAccount newAcc = em.merge(account);

        HCredentials fedoraCreds =
                new HOpenIdCredentials(newAcc,
                        "http://fedora-user.id.fedoraproject.org/",
                        "fedora-user@fedora.org");
        newAcc.getCredentials().add(fedoraCreds);
        return newAcc;
View Full Code Here

TOP

Related Classes of org.zanata.model.security.HCredentials

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.