Package org.ofbiz.crowd.security

Examples of org.ofbiz.crowd.security.SecurityServerHttpBindingStub


public abstract class CrowdWorker {

    private static final String module = CrowdWorker.class.getName();

    protected String callAuthenticate(String user, String password) throws RemoteException {
        SecurityServerHttpBindingStub stub = getStub();
        AuthenticatedToken token = getToken(stub);

        // auth the user
        String userToken;
        try {
            userToken = stub.authenticatePrincipalSimple(token, user, password);
        } catch (InvalidAuthenticationException e) {
            return null;
        } catch (InvalidAuthorizationTokenException e) {
            Debug.logError(e, module);
            throw e;
View Full Code Here


        return userToken;
    }

    protected UserWrapper callGetUser(String user) throws RemoteException {
        SecurityServerHttpBindingStub stub = getStub();
        AuthenticatedToken token = getToken(stub);

        SOAPPrincipal principal;
        try {
            principal = stub.findPrincipalByName(token, user);
        } catch (InvalidAuthorizationTokenException e) {
            Debug.logError(e, module);
            throw e;
        } catch (ObjectNotFoundException e) {
            Debug.logError(e, module);
            throw e;
        } catch (RemoteException e) {
            Debug.logError(e, module);
            throw e;
        }

        String[] groups;
        try {
            groups = stub.findGroupMemberships(token, user);
        } catch (InvalidAuthorizationTokenException e) {
            Debug.logError(e, module);
            throw e;
        } catch (ObjectNotFoundException e) {
            groups = new String[0];
View Full Code Here

    protected void callUpdatePassword(String user, String password) throws RemoteException {
        PasswordCredential credential = new PasswordCredential();
        credential.setCredential(password);
        credential.setEncryptedCredential(false);

        SecurityServerHttpBindingStub stub = getStub();
        AuthenticatedToken token = getToken(stub);

        try {
            stub.updatePrincipalCredential(token, user, credential);
        } catch (RemoteException e) {
            Debug.logError(e, module);
            throw e;
        }
    }
View Full Code Here

TOP

Related Classes of org.ofbiz.crowd.security.SecurityServerHttpBindingStub

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.