Examples of ServerManager


Examples of org.maqetta.server.ServerManager

    protected int                    maxUsers = 0;
    protected int            usersCount;


    public UserManagerImpl() {
      ServerManager serverManger = ServerManager.getServerManager();

      initWorkspace();
     
        String maxUsersStr = serverManger.getDavinciProperty(IDavinciServerConstants.MAX_USERS);
        if (maxUsersStr != null && maxUsersStr.length() > 0) {
            this.maxUsers = Integer.valueOf(maxUsersStr).intValue();
        }

        this.personManager = ServerManager.getServerManager().getPersonManager();
View Full Code Here

Examples of org.menacheri.jetserver.server.ServerManager

    AbstractApplicationContext ctx = new AnnotationConfigApplicationContext(ZombieSpringConfig.class);
    // For the destroy method to work.
    ctx.registerShutdownHook();
   
    // Start the main game server
    ServerManager serverManager = ctx.getBean(ServerManager.class);
    //serverManager.startServers(18090,843,8081);
    try
    {
      serverManager.startServers();
    }
    catch (Exception e)
    {
      LOG.error("Unable to start servers cleanly: {}",e);
    }
View Full Code Here

Examples of org.menacheri.jetserver.server.ServerManager

   
    // For the destroy method to work.
    context.registerShutdownHook();
   
    // Start tcp and flash servers
    ServerManager manager = (ServerManager)context.getBean("serverManager");
    try
    {
      manager.startServers(8090,843,8081);
    }
    catch (Exception e)
    {
      LOG.error("Could not start servers cleanly: {}",e);
    }
View Full Code Here

Examples of org.openid4java.server.ServerManager

  public void init(ServletConfig config) throws ServletException {
    super.init(config);

    context = config.getServletContext();

    this.manager = new ServerManager();
    manager.setOPEndpointUrl(OP_ENDPOINT_URL);
        manager.getRealmVerifier().setEnforceRpId(false);
        manager.setSharedAssociations(new InMemoryServerAssociationStore());
        manager.setPrivateAssociations(new InMemoryServerAssociationStore());
   
View Full Code Here

Examples of org.openid4java.server.ServerManager

        return serverManager;
    }

    @Inject
    public void startup() throws Exception {
        serverManager = new ServerManager();
        serverManager.setOPEndpointUrl(providerBean.get().getServiceURL(OpenIdService.OPEN_ID_SERVICE));
    }
View Full Code Here

Examples of org.openid4java.server.ServerManager

   }

   @Inject
   public void startup() throws Exception
   {
      serverManager = new ServerManager();
      serverManager.setOPEndpointUrl(providerBean.getServiceURL(OpenIdService.OPEN_ID_SERVICE));
   }
View Full Code Here

Examples of org.openid4java.server.ServerManager

        ParameterList paramList = null;
        Message message = null;
        paramList = getParameterList(request.getParams());
        String destinationUrl = null;
        AuthRequest authReq = null;
        ServerManager manager = null;
        OpenIDAuthResponseDTO response = null;

        response = new OpenIDAuthResponseDTO();
        manager = OpenIDProvider.getInstance().getManager();
        authReq = AuthRequest.createAuthRequest(paramList, manager.getRealmVerifier());
        message = manager.authResponse(paramList, request.getOpLocalId(), request
                .getUserSelectedClaimedId(), request.isAuthenticated());

        if (message instanceof DirectError || message instanceof AuthFailure) {
            // Validation fails - returns 'cancel'.
            destinationUrl = message.getDestinationUrl(true);
            response.setDestinationUrl(destinationUrl);
            response.setValidated(false);
        } else {
            OpenIDExtension extension = null;
            OpenIDAuthenticationRequest req = null;
            req = new OpenIDAuthenticationRequest();

            if (request.isPhishiingResistanceAuthRequest()) {
                // Relying party requests phishing-resistant login.
                req.setPhishingResistanceLogin(true);
            }
            if (request.isMultiFactorAuthRequested()) {
                // Relying party requests phishing-resistant login.
                req.setMultifactorLogin(true);
            }

            req.setAuthRequest(authReq);

            // A given OpenID authentication request can contain multiple
            // extensions.
            // OpenIDProvider is not aware of extensions - we simply delegate
            // the extension
            // processing logic to a subclass of OpenIDExtension.
            for (Object alias : authReq.getExtensions()) {
                req.setExtensionAlias((String) alias);

                // Get the corresponding OpenIDExtension instance from the
                // OpenIDExtensionFactory.
                extension = OpenIDExtensionFactory.getInstance().getExtension(req);
                if (extension != null) {
                    MessageExtension messageExtension = null;
                    messageExtension = extension.getMessageExtension(request.getOpenID(), request
                            .getProfileName());
                    if (messageExtension != null) {
                        message.addExtension(messageExtension);
                        AuthSuccess authSuccess = (AuthSuccess) message;
                        authSuccess.addSignExtension((String) alias);
                        manager.sign(authSuccess);
                    }
                }
            }

            // We only have SReg extensions.
View Full Code Here

Examples of org.openid4java.server.ServerManager

        ParameterList paramList = getParameterList(papeInfoRequestDto.getParamList());
        String username = OpenIDUtil.getUserName(papeInfoRequestDto.getOpenID());

        AuthRequest authReq = null;
        ServerManager manager = null;
        String domainName = null;
        Registry registry;
        String tenatUser = null;

        try {
            manager = OpenIDProvider.getInstance().getManager();
            authReq = AuthRequest.createAuthRequest(paramList, manager.getRealmVerifier());
            OpenIDAuthenticationRequest req = new OpenIDAuthenticationRequest();
            req.setAuthRequest(authReq);
            setPAPEProperties(req, paramList);
            domainName = TenantUtils.getDomainNameFromOpenId(papeInfoRequestDto.getOpenID());
            tenatUser = UserCoreUtil.getTenantLessUsername(username);
View Full Code Here

Examples of org.openid4java.server.ServerManager

    @Get("form")
    public Representation represent() throws ParserConfigurationException {
        Document response = null;

        ConcurrentMap<String, Object> attribs = getContext().getAttributes();
        ServerManager manager = (ServerManager) attribs.get("openid_manager");
        String opEndpoint = manager.getOPEndpointUrl();

        Form query = getQuery();
        String returnTo = query.getFirstValue("returnTo");
        if (returnTo != null && returnTo.length() > 0) { // OP Server lookup
            response = createDocument(TYPE_RETURN_TO, returnTo, null);
View Full Code Here

Examples of org.openid4java.server.ServerManager

    private Representation handle(ParameterList request) {
        Logger log = getLogger();
        log.info("Handle on OP");
        ConcurrentMap<String, Object> attribs = getContext().getAttributes();
        ServerManager manager = (ServerManager) attribs.get("openid_manager");
        log.info("OP endpoint = " + manager.getOPEndpointUrl());

        String mode = request.hasParameter("openid.mode") ? request
                .getParameterValue("openid.mode") : null;

        Message response;
        String responseText;

        if ("associate".equals(mode)) {
            // --- process an association request ---
            response = manager.associationResponse(request);
            responseText = response.keyValueFormEncoding();
        } else if ("checkid_setup".equals(mode)
                || "checkid_immediate".equals(mode)) {
            // interact with the user and obtain data needed to continue
            List<?> userData = userInteraction(request,
                    manager.getOPEndpointUrl());

            String userSelectedId = (String) userData.get(0);
            String userSelectedClaimedId = (String) userData.get(1);
            Boolean authenticatedAndApproved = (Boolean) userData.get(2);

            // --- process an authentication request ---
            response = manager.authResponse(request, userSelectedId,
                    userSelectedClaimedId,
                    authenticatedAndApproved.booleanValue());

            if (response instanceof DirectError) {
                Form f = new Form();
                @SuppressWarnings("unchecked")
                Map<String, String> m = (Map<String, String>) response
                        .getParameterMap();
                for (String key : m.keySet()) {
                    f.add(key, m.get(key));
                }
                return f.getWebRepresentation();
            } else {
                // caller will need to decide which of the following to use:

                // option1: GET HTTP-redirect to the return_to URL
                // return new
                // StringRepresentation(response.getDestinationUrl(true));
                redirectSeeOther(response.getDestinationUrl(true));
                return new EmptyRepresentation();

                // option2: HTML FORM Redirection
                // RequestDispatcher dispatcher =
                // getServletContext().getRequestDispatcher("formredirection.jsp");
                // httpReq.setAttribute("prameterMap",
                // response.getParameterMap());
                // httpReq.setAttribute("destinationUrl",
                // response.getDestinationUrl(false));
                // dispatcher.forward(request, response);
                // return null;
            }
        } else if ("check_authentication".equals(mode)) {
            // --- processing a verification request ---
            response = manager.verify(request);
            log.info("OpenID : " + response.keyValueFormEncoding());
            responseText = response.keyValueFormEncoding();
        } else if (Method.GET.equals(getMethod())) {
            // Could be a discovery request
            sendXRDSLocation();
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.