Package org.jdesktop.wonderland.common.auth

Examples of org.jdesktop.wonderland.common.auth.WonderlandIdentity


                throw new CredentialException("No username specified");
            }

            // construct a new WonderlandServerIdentity to return
            return new WonderlandServerIdentity
                    (new WonderlandIdentity(username, fullname, email));
        } catch (AuthenticationException ae) {
            logger.warning("Authentication error: " + ae);
           
            CredentialException ce = new CredentialException("Error authenticating token");
            ce.initCause(ae);
View Full Code Here


       
        return user;
    }
   
    private UserMO createUserMO(String username) {
        WonderlandIdentity identity = AppContext.getManager(ClientIdentityManager.class).getClientID();
        UserMO ret = new UserMO(identity);
        AppContext.getDataManager().setBinding("user_" + identity.getUsername(), ret);
        return ret;
    }
View Full Code Here

        // cell with a wrapper that makes the request based on a new
        // identity.

        // first find the client's identity.  If this returns null, force an
        // error to the client.
        WonderlandIdentity id = getIdentity(message.getClientID());
        if (id == null) {
            logger.warning("ID " + message.getClientID() + " not found.");
            return new ErrorResource();
        }
View Full Code Here

        // make sure this user is an owner, and therefore has permission
        // to set the server state of this component.  Note we don't
        // check the user if their ID is null (that means it is the system
        // doing the setting) or if there are no owners.
        ClientIdentityManager cim = AppContext.getManager(ClientIdentityManager.class);
        WonderlandIdentity id = cim.getClientID();
        if (id != null && owners != null && !owners.isEmpty()) {
            // make a request to set the permissions if this is an owner
            Resource ownerRsrc = new OwnerResource(cellRef.get().getCellID().toString(),
                                                   owners);
            ActionMap am = new ActionMap(ownerRsrc, new OwnerAction());
            ResourceMap rm = new ResourceMap();
            rm.put(ownerRsrc.getId(), am);

            SecurityManager sec = AppContext.getManager(SecurityManager.class);
            SecureTask sst = new SetStateTask(id.getUsername(), ownerRsrc.getId(),
                                              this, scss.getPermissions());
            sec.doSecure(rm, sst);
        } else {
            // no security check, just set the values
            setCellPermissions(scss.getPermissions());
View Full Code Here

    @Override
    public CellClientState getClientState(CellClientState cellClientState,
      WonderlandClientID clientID, ClientCapabilities capabilities) {

        if (cellClientState == null) {
            WonderlandIdentity id = new WonderlandIdentity(username, null, null);
            cellClientState = new OrbCellClientState(id, username, callID,
    getPlayerWithVpCallID(), bystanders);
        }

        return super.getClientState(cellClientState, clientID, capabilities);
View Full Code Here

  if (pi != null) {
      usernameAlias = pi.getUsernameAlias();
  }

  WonderlandIdentity userID = new WonderlandIdentity(username, usernameAlias, null);

  presenceInfo = new PresenceInfo(orbCell.getCellID(), null, userID, orbCell.getCallID());

  presenceInfo.setUsernameAlias(usernameAlias);
View Full Code Here

        // send an initialization message to the client over the internal
        // connection.  The client's unique ID is the ID of the ClientSession
        // managed object.  This id is guaranteed by Darkstar to be unique
        // across the whole Darkstar cluster.
        sessionID = sessionRef.getId();
        WonderlandIdentity userID =
               AppContext.getManager(ClientIdentityManager.class).getClientID();
        Message sim = new SessionInitializationMessage(sessionID, userID);
        sendToSession(SESSION_INTERNAL_CLIENT_ID, sim);
    }
View Full Code Here

            return;
        }

        LOGGER.fine("Selected user is " + selectedUser);
        String userName = NameTagNode.getUsername(selectedUser);
        WonderlandIdentity id = model.getIDForAlias(userName);

        if (id == null) {
            LOGGER.warning("No ID found for user " + selectedUser);
            return;
        }
View Full Code Here

        SoftphoneControl sc = SoftphoneControlImpl.getInstance();

        String callID = sc.getCallID();

        PresenceInfo presenceInfo = new PresenceInfo(null, null,
      new WonderlandIdentity(name, name, null), callID);

        pm.addLocalPresenceInfo(presenceInfo);

  updateUserList();
        session.send(client, new VoiceChatDialOutMessage(group, callID, chatType, presenceInfo, number));
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.auth.WonderlandIdentity

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.