Examples of associate()


Examples of org.apache.openejb.spi.SecurityService.associate()

        final char[] password = passwordValidationCallback.getPassword();

        SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
        try {
          Object loginObj = securityService.login(securityRealmName, userName, password == null ? "" : new String(password));
          securityService.associate(loginObj);
          callerPrincipal = securityService.getCallerPrincipal();
          passwordValidationCallback.setResult(true);
        } catch (LoginException e) {
          passwordValidationCallback.setResult(false);
        }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

                if (realmName == null) {
                    identity = securityService.login(user, pass);
                } else {
                    identity = securityService.login(realmName, user, pass);
                }
                securityService.associate(identity);
            } catch (LoginException e) {
                throw (AuthenticationException) new AuthenticationException("User could not be authenticated: "+user).initCause(e);
            }
        }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        ThreadContext callContext = ThreadContext.getThreadContext();
        Object localClientIdentity = ClientSecurity.getIdentity();
        try {
            if (callContext == null && localClientIdentity != null) {
                SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
                securityService.associate(localClientIdentity);
            }
            if (strategy == CLASSLOADER_COPY) {

                IntraVmCopyMonitor.pre(strategy);
                ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        }

        SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
        try {
            Object clientIdentity = req.getClientIdentity();
            if (clientIdentity != null) securityService.associate(clientIdentity);
        } catch (Throwable t) {
            replyWithFatalError(out, t, "Security system failed to associate thread with the thread");
            return;
        }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        }

        SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
        try {
            Object clientIdentity = req.getClientIdentity();
            if (clientIdentity != null) securityService.associate(clientIdentity);
        } catch (Throwable t) {
            replyWithFatalError(out, t, "Client identity is not valid");
            return;
        }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

                    try {
                        final SecurityService securityService = getSecurityService();
                        token = securityService.login(realmName, username, password);
                        if (token != null) {
                            securityService.associate(token);
                        }
                    } catch (final LoginException e) {
                        // login failed, return 401
                    }
                }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        final Object token;
        try {
            securityService.disassociate();

            token = securityService.login(user, password);
            securityService.associate(token);

        } catch (final LoginException e) {
            throw new SecurityException("cannot log user " + user, e);
        }
    }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        try {
            try {
                final Object clientIdentity = req.getClientIdentity();
                if (clientIdentity != null) {//noinspection unchecked
                    securityService.associate(clientIdentity);
                }
            } catch (final LoginException t) {
                failed = true;
                return setResponseError(res, version, t, "Client identity is not valid - " + req);
            }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        }

        SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
        try {
            Object clientIdentity = req.getClientIdentity();
            if (clientIdentity != null) securityService.associate(clientIdentity);
        } catch (Throwable t) {
            replyWithFatalError(out, t, "Security system failed to associate thread with the thread");
            return;
        }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

                if (realmName == null) {
                    identity = securityService.login(user, pass);
                } else {
                    identity = securityService.login(realmName, user, pass);
                }
                securityService.associate(identity);
            } catch (LoginException e) {
                throw (AuthenticationException) new AuthenticationException("User could not be authenticated: "+user).initCause(e);
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.