Examples of Identity


Examples of org.apache.geronimo.gshell.remote.jaas.Identity

            try {
                LoginContext loginContext = new LoginContext(realm, new UsernamePasswordCallbackHandler(username, password));
                loginContext.login();

                Subject subject = loginContext.getSubject();
                context.identity = new Identity(subject);

                log.debug("Username: {}, Identity: {}", context.getUsername(), context.identity);

                LoginMessage.Success reply = new LoginMessage.Success(context.identity.getToken());
                reply.setCorrelationId(message.getId());
View Full Code Here

Examples of org.apache.lenya.ac.Identity

        du.setAttributeValue(doc, "/echo:entry/echo:link/@rel""alternate");
        du.setAttributeValue(doc, "/echo:entry/echo:link/@href", "http://bob.blog/");
        du.setAttributeValue(doc, "/echo:entry/echo:link/@type", "text/xml");

        // Replace author
        Identity identity = (Identity)parameters.get("org.apache.lenya.ac.Identity");
        du.setElementValue(doc, "/echo:entry/echo:author/echo:name", identity.getUser().getId());

        // Replace date created (and issued and modified, FIXME: issued should be set during first time publishing, modified should be set during re-publishing)
        DateFormat datefmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
        DateFormat ofsfmt = new SimpleDateFormat("Z");
View Full Code Here

Examples of org.apache.lenya.cms.ac.Identity

                if (session == null) {
                    return false;
                }

                Identity identity = new Identity(idoc);

                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("IDENTITY: " + identity);
                }
View Full Code Here

Examples of org.apache.muse.ws.dm.muws.Identity

     *
     */
    private static String getResourceId(WsResource resource)
        throws BaseFault
    {
        Identity id = (Identity)resource.getCapability(MuwsConstants.IDENTITY_URI);
        return id == null ? null : id.getResourceId();
    }
View Full Code Here

Examples of org.apache.ojb.broker.Identity


  public Object getObjectById(final Class entityClass, final Object idValue) throws DataAccessException {
    return execute(new PersistenceBrokerCallback() {
      public Object doInPersistenceBroker(PersistenceBroker pb) throws PersistenceBrokerException {
        Identity id = pb.serviceIdentity().buildIdentity(entityClass, idValue);
        Object result = pb.getObjectByIdentity(id);
        if (result == null) {
          throw new ObjectRetrievalFailureException(entityClass, idValue);
        }
        return result;
View Full Code Here

Examples of org.apache.struts2.showcase.model.IdEntity

   * @param tryObject The object, induced by first params invocation, possibly containing id to try to get persistent
   *                  object for
   * @return The persistent object, if found. <tt>null</tt> otherwise.
   */
  protected IdEntity fetch(Serializable tryId, IdEntity tryObject) {
    IdEntity result = null;
    if (tryId != null) {
      result = getDao().get(tryId);
    } else if (tryObject != null) {
      result = getDao().get(tryObject.getId());
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.servicediscovery.management.Identity

        return name;
    }

    public List<InfoElement> getServerInfosFor(InfoRequest request) {
        List<InfoElement> infoElements = new ArrayList<InfoElement>();
        infoElements.add(new Identity("conference", "text", getName()));
        infoElements.add(new Feature(NamespaceURIs.XEP0045_MUC));
        return infoElements;
    }
View Full Code Here

Examples of org.ardverk.dht.routing.Identity

  protected void configure() {
  }

  @Provides @Singleton
  Identity getIdentity() {
    return new Identity(contactId, address);
  }
View Full Code Here

Examples of org.atomojo.app.client.Identity

      for (DB db : dbList.values()) {
         db.connect();
      }
      web.start();
     
      Identity admin = new Identity("admin","admin");
      Reference autoRef = new Reference("http://localhost:8080/R/");
      FeedClient client = new FeedClient(autoRef,admin);
     
      Status status = client.create("<feed xmlns='http://www.w3.org/2005/Atom'><title>autoconf</title></feed>");
      assertTrue(status.isSuccess());
View Full Code Here

Examples of org.atomojo.www.util.Identity

         authForm.add("Passwd", password);
         request.setEntity(authForm.getWebRepresentation());
         Response response = client.handle(request);
         if (response.getStatus().isSuccess()) {
            context.getLogger().info("Authenticated "+username);
            actor.authenticated(form,new Identity(UUID.randomUUID().toString(),username,username,username,email));
         } else {
            context.getLogger().info("Authorization request for "+username+" returned: "+response.getStatus().getCode());
            actor.unauthorized();
         }
      } else {
         Request request = new Request(Method.GET,service);
         request.setChallengeResponse(new ChallengeResponse(ChallengeScheme.HTTP_BASIC,username,password));
         Response response = client.handle(request);
         if (response.getStatus().isSuccess()) {
            XMLRepresentationParser parser = new XMLRepresentationParser();
            try {
               Document doc = parser.load(response.getEntity());
               String session = doc.getDocumentElement().getAttributeValue("id");
               String id = doc.getDocumentElement().getAttributeValue("user-id");
               String alias = doc.getDocumentElement().getAttributeValue("user-alias");
               Element nameE = doc.getDocumentElement().getFirstElementNamed(NAME);
               Element emailE = doc.getDocumentElement().getFirstElementNamed(EMAIL);
               Identity identity = new Identity(session,id,alias,nameE==null ? null : nameE.getText(),emailE==null ? null : emailE.getText());
               context.getLogger().info("Authenticated "+username);
               actor.authenticated(form,identity);
            } catch (Exception ex) {
               context.getLogger().log(Level.SEVERE,"Cannot parse auth result.",ex);
               actor.unauthorized();
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.