Examples of AuthenticatedUser


Examples of io.fathom.cloud.identity.model.AuthenticatedUser

    }

    @Override
    public void setProjectSecret(ClientApp app, Auth auth, Project project, byte[] payload) throws CloudException {
        AuthenticatedUser user = authService.toAuthenticatedUser(auth);

        Project authProject = auth.getProject();
        if (project == null) {
            throw new IllegalArgumentException();
        }
View Full Code Here

Examples of io.fathom.cloud.identity.model.AuthenticatedUser

        }
    }

    @Override
    public byte[] findUserSecret(ClientApp app, Auth auth) throws CloudException {
        AuthenticatedUser user = authService.toAuthenticatedUser(auth);

        long userId = user.getUserId();
        NamedItemCollection<AttachmentData> store = authRepository.getUserAttachments(userId);

        return findUserSecret(store, app, user);
    }
View Full Code Here

Examples of io.fathom.cloud.identity.model.AuthenticatedUser

        return findUserSecret(store, app, user);
    }

    @Override
    public byte[] findProjectSecret(ClientApp app, Auth auth, Project project) throws CloudException {
        AuthenticatedUser user = authService.toAuthenticatedUser(auth);

        Project authProject = auth.getProject();
        if (project == null) {
            throw new IllegalArgumentException();
        }
View Full Code Here

Examples of io.fathom.cloud.identity.model.AuthenticatedUser

    }

    @Override
    public ClientApp createClientApp(Auth auth, Project project, String appName, String appPassword)
            throws CloudException {
        AuthenticatedUser authenticatedUser = authService.toAuthenticatedUser(auth);

        AuthenticatedProject authenticatedProject = identityService.authenticateToProject(authenticatedUser,
                project.getId());
        if (authenticatedProject == null) {
            throw new IllegalStateException();
View Full Code Here

Examples of jrun.servlet.security.AuthenticatedUser

            start(FlexContext.getServletConfig());
        }

        try
        {
            AuthenticatedUser user = null;
            String password = extractPassword(credentials);

            if (password != null)
            {
                // Test for the presence of a response here (rather than request) because NIO
                // endpoints require the alternate code path and they don't populate the response
                // in FlexContext.
                HttpServletResponse response = FlexContext.getHttpResponse();
                if (response != null)
                {
                    HttpServletRequest request = FlexContext.getHttpRequest();
                    user = appSecurity.authenticate(username, password, request.getSession(true));
                }
                else
                {
                    ServletContext servletContext = FlexContext.getServletConfig().getServletContext();
                    WebApplication webApp = ((jrun.servlet.JRunServletContext)servletContext).getWebApplication();
                    HttpSession tempSession = webApp.getSessionService().createSession("temp");
                    user = appSecurity.authenticate(username, password, tempSession);
                    tempSession.invalidate();
                }
                return user.getPrincipal();
            }
        }
        catch (Exception ex)
        {
            SecurityException se;
View Full Code Here

Examples of org.apache.axis.security.AuthenticatedUser

                    null, null );

            String passwd = (String) msgContext.getProperty( MessageContext.PASSWORD );
            category.debug( "Pass: " + passwd );

            AuthenticatedUser authUser = provider.authenticate(msgContext);

            // if a password is defined, then it must match
            if ( authUser == null)
                throw new AxisFault( "Server.Unauthenticated",
                    "User '" + userID + "' not authenticated",
View Full Code Here

Examples of org.apache.axis.security.AuthenticatedUser

        boolean allowByDefault = false;
        String optVal = (String)getOption("allowByDefault");
        if ((optVal != null) && (optVal.equalsIgnoreCase("true")))
            allowByDefault = true;

        AuthenticatedUser user = (AuthenticatedUser)msgContext.
                                         getProperty(MessageContext.AUTHUSER);

        if (user == null)
            throw new AxisFault("Server.NoUser",
                    "Need to specify a user for authorization!", null, null);

        String userID = user.getName();
        Handler serviceHandler = msgContext.getServiceHandler();

        if (serviceHandler == null)
            throw new AxisFault("No target service to authorize for!");
View Full Code Here

Examples of org.apache.axis.security.AuthenticatedUser

            String passwd = msgContext.getPassword();
            if (log.isDebugEnabled()) {
                log.debug( JavaUtils.getMessage("password00", passwd) );
            }

            AuthenticatedUser authUser = provider.authenticate(msgContext);

            // if a password is defined, then it must match
            if ( authUser == null)
                throw new AxisFault( "Server.Unauthenticated",
                    JavaUtils.getMessage("cantAuth01", userID),
View Full Code Here

Examples of org.apache.axis.security.AuthenticatedUser

        }

        boolean allowByDefault =
            JavaUtils.isTrueExplicitly(getOption("allowByDefault"));

        AuthenticatedUser user = (AuthenticatedUser)msgContext.
                                         getProperty(MessageContext.AUTHUSER);

        if (user == null)
            throw new AxisFault("Server.NoUser",
                    JavaUtils.getMessage("needUser00"), null, null);

        String userID = user.getName();
        Handler serviceHandler = msgContext.getService();

        if (serviceHandler == null)
            throw new AxisFault(JavaUtils.getMessage("needService00"));
View Full Code Here

Examples of org.apache.axis.security.AuthenticatedUser

            String passwd = msgContext.getPassword();
            if (logger.isDebugEnabled()) {
                logger.debug("password : " + passwd );
            }

            AuthenticatedUser authUser = provider.authenticate(msgContext);

            // if a password is defined, then it must match
            if ( authUser == null) {
                logger.debug("authuser is null");
                return false;
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.